Hide the password input when there is no password

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12 2018-02-11 14:07:02 -05:00
parent 55e50eced6
commit 2cf1f0e8fc
No known key found for this signature in database
GPG Key ID: ABB8FC9789AF524D
1 changed files with 5 additions and 1 deletions

View File

@ -99,7 +99,7 @@ if ($serverName === "pi.hole") {
/* Start processing Block Page from here */ /* Start processing Block Page from here */
// Determine placeholder text based off $svPasswd presence // Determine placeholder text based off $svPasswd presence
$wlPlaceHolder = empty($svPasswd) ? "No admin password set" : "Javascript disabled"; $wlPlaceHolder = empty($svPasswd) ? "" : "Javascript disabled";
// Define admin email address text based off $svEmail presence // Define admin email address text based off $svEmail presence
$bpAskAdmin = !empty($svEmail) ? '<a href="mailto:'.$svEmail.'?subject=Site Blocked: '.$serverName.'"></a>' : "<span/>"; $bpAskAdmin = !empty($svEmail) ? '<a href="mailto:'.$svEmail.'?subject=Site Blocked: '.$serverName.'"></a>' : "<span/>";
@ -247,6 +247,10 @@ setHeader();
echo '$("#bpWLPassword").attr("placeholder", "Password");'; echo '$("#bpWLPassword").attr("placeholder", "Password");';
echo '$("#bpWLPassword").prop("disabled", false);'; echo '$("#bpWLPassword").prop("disabled", false);';
} }
// Otherwise hide the input
else {
echo '$("#bpWLPassword").hide();';
}
} }
?> ?>
} }