From 2cf1f0e8fc96e346ccde2a643f263af0fc50f6dc Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sun, 11 Feb 2018 14:07:02 -0500 Subject: [PATCH] Hide the password input when there is no password Signed-off-by: Mcat12 --- advanced/index.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/advanced/index.php b/advanced/index.php index 45d9882a..4328714a 100644 --- a/advanced/index.php +++ b/advanced/index.php @@ -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) ? '' : ""; @@ -247,6 +247,10 @@ setHeader(); echo '$("#bpWLPassword").attr("placeholder", "Password");'; echo '$("#bpWLPassword").prop("disabled", false);'; } + // Otherwise hide the input + else { + echo '$("#bpWLPassword").hide();'; + } } ?> }