From 90f81bfd06932aab1a79b4df5832d5598bf29622 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Mon, 30 Sep 2019 14:11:59 +0200 Subject: [PATCH] Fix confirmation --- wol/www/index.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/wol/www/index.php b/wol/www/index.php index d046d36..8f03bfc 100644 --- a/wol/www/index.php +++ b/wol/www/index.php @@ -143,20 +143,10 @@ if(!isset($action)){ <input type="hidden" name="mac" value="<?php echo $entry[1]; ?>"> <input type="submit" value="Démarrer" title="Démarrer la machine"> </form> - <script> - function validate(name) { - if(!confirm("Êtes-vous sûr de vouloir redémarrer la machine"+name) { - return false; - } - else { - return true; - } - } - </script> - <form action="index.php" method="post"> + <form action="index.php" method="post" onsubmit='return confirm("Êtes-vous sûr de vouloir redémarrer la machine <? echo $entry[2]; ?>");'> <input type="hidden" name="action" value="reboot"> <input type="hidden" name="mac" value="<?php echo $entry[1]; ?>"> - <input type="submit" value="Redémarrer" title="redémarrer la machine" onsubmit="return validate(<? echo $entry[2]; ?>);" > + <input type="submit" value="Redémarrer" title="redémarrer la machine"> </form> <form action="index.php" method="post"> <input type="hidden" name="action" value="upgrade"> -- GitLab