Hide the password input when there is no password
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
55e50eced6
commit
2cf1f0e8fc
|
@ -99,7 +99,7 @@ if ($serverName === "pi.hole") {
|
|||
/* Start processing Block Page from here */
|
||||
|
||||
// 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
|
||||
$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").prop("disabled", false);';
|
||||
}
|
||||
// Otherwise hide the input
|
||||
else {
|
||||
echo '$("#bpWLPassword").hide();';
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue