Skip to content

Commit

Permalink
Show "Replace" instead of "Enable" on the action button (also make it…
Browse files Browse the repository at this point in the history
… warning colored)

Signed-off-by: DL6ER <[email protected]>
  • Loading branch information
DL6ER committed Jun 16, 2024
1 parent 3681d71 commit aab58a7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/pi-hole/js/settings-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,12 @@ function processWebServerConfig() {
})
.done(function (data) {
setConfigValues("webserver", "webserver", data.config.webserver);
if (data.config.webserver.api.app_pwhash.value.length > 0)
if (data.config.webserver.api.app_pwhash.value.length > 0) {
$("#existing_apppw_warning").show();
$("#apppw_submit").text("Replace app password");
$("#apppw_submit").removeClass("btn-success");
$("#apppw_submit").addClass("btn-warning");
}
})
.fail(function (data) {
apiFailure(data);
Expand Down

0 comments on commit aab58a7

Please sign in to comment.