Skip to content
Snippets Groups Projects
Verified Commit 90f81bfd authored by David Beniamine's avatar David Beniamine
Browse files

Fix confirmation

parent ad561844
No related branches found
No related tags found
No related merge requests found
...@@ -143,20 +143,10 @@ if(!isset($action)){ ...@@ -143,20 +143,10 @@ if(!isset($action)){
<input type="hidden" name="mac" value="<?php echo $entry[1]; ?>"> <input type="hidden" name="mac" value="<?php echo $entry[1]; ?>">
<input type="submit" value="Démarrer" title="Démarrer la machine"> <input type="submit" value="Démarrer" title="Démarrer la machine">
</form> </form>
<script> <form action="index.php" method="post" onsubmit='return confirm("Êtes-vous sûr de vouloir redémarrer la machine <? echo $entry[2]; ?>");'>
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">
<input type="hidden" name="action" value="reboot"> <input type="hidden" name="action" value="reboot">
<input type="hidden" name="mac" value="<?php echo $entry[1]; ?>"> <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>
<form action="index.php" method="post"> <form action="index.php" method="post">
<input type="hidden" name="action" value="upgrade"> <input type="hidden" name="action" value="upgrade">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment