Browse Source

Removed unsaved settings confirmation

Always confirm Factory reset
rfm69
Teo Pavel 6 years ago
parent
commit
a5965b25fe
1 changed files with 3 additions and 17 deletions
  1. +3
    -17
      code/html/custom.js

+ 3
- 17
code/html/custom.js View File

@ -460,24 +460,10 @@ function doRestore() {
} }
function doFactoryReset() { function doFactoryReset() {
var response;
ask = (typeof ask == "undefined") ? true : ask;
if (numChanged > 0) {
response = window.confirm("Some changes have not been saved yet, do you want to save them first?");
if (response === true) {
return doUpdate();
}
}
if (ask) {
response = window.confirm("Are you sure you want to restore to factory settings?");
if (response === false) {
return false;
}
var response = window.confirm("Are you sure you want to restore to factory settings?");
if (response === false) {
return false;
} }
websock.send(JSON.stringify({"action": "factory_reset"})); websock.send(JSON.stringify({"action": "factory_reset"}));
doReload(5000); doReload(5000);
return false; return false;


Loading…
Cancel
Save