Show "Replace" instead of "Enable" on the action button (also make it warning colored)

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2024-06-16 07:15:58 +02:00
parent 3681d7187a
commit aab58a7ed7

View File

@@ -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);