added reboot buttons to config pages

This commit is contained in:
George Ruinelli
2022-08-30 22:07:25 +02:00
parent 5dc7b90a1c
commit 592b93ce2b
4 changed files with 55 additions and 4 deletions

View File

@@ -119,6 +119,9 @@ th, td {
<table>
<tr>
<td><input class="button" type="submit" id="saveroi" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini" tabindex=7></td>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
</tr>
</table>
@@ -140,6 +143,15 @@ th, td {
lockAR = true;
basepath = "http://192.168.178.26";
function doReboot() {
if (confirm("Are you sure you want to reboot? Did you save the config?")) {
var stringota = "/reboot";
window.location = stringota;
window.location.href = stringota;
window.location.assign(stringota);
window.location.replace(stringota);
}
}
function EnDisableDigits() {
isEnabled = document.getElementById("Category_Digits_enabled").checked;