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

@@ -86,7 +86,10 @@ select {
<table>
<tr>
<td colspan="2"><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
<td><input class="button" type="submit" name="saveroi" onclick="SaveToConfig()" value="Save all to Config.ini"></td>
</tr>
<tr>
<td><button class="button" id="reboot" type="button" onclick="doReboot()">Reboot to activate saved config</button></td>
</tr>
</table>
@@ -107,7 +110,17 @@ select {
basepath = "http://192.168.178.26";
basepath = "",
param;
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 ChangeSelection(){
aktindex = parseInt(document.getElementById("index").value);
UpdateReference();