From 235deb91c62e7d19c4ad0b7481ff6cb91976c749 Mon Sep 17 00:00:00 2001 From: Aaron W Morris Date: Mon, 21 Aug 2023 10:52:33 -0400 Subject: [PATCH] add second confirm for reboot --- indi_allsky/flask/templates/system.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/indi_allsky/flask/templates/system.html b/indi_allsky/flask/templates/system.html index b833da534..8e94dd958 100644 --- a/indi_allsky/flask/templates/system.html +++ b/indi_allsky/flask/templates/system.html @@ -587,11 +587,14 @@
Reboot
- Confirm + Confirm 1
+
+ Confirm 2 +

@@ -822,7 +825,12 @@ $("#button_system_reboot").on("click", function() { - if (! $("#REBOOT_CONFIRM").prop('checked')) { + if (! $("#REBOOT_CONFIRM1").prop('checked')) { + console.log('Reboot checkbox not checked'); + return; + } + + if (! $("#REBOOT_CONFIRM2").prop('checked')) { console.log('Reboot checkbox not checked'); return; } @@ -831,7 +839,8 @@ $("#button_system_reboot").prop('disabled', true); $("#button_system_shutdown").prop('disabled', true); - $("#REBOOT_CONFIRM").prop('checked', false); + $("#REBOOT_CONFIRM1").prop('checked', false); + $("#REBOOT_CONFIRM2").prop('checked', false); button_click('system', 'reboot'); });