Commit 25a6aa6b authored by Franco Fichtner's avatar Franco Fichtner

system: change halt to power off; closes #907

parent dc44d88d
......@@ -40,7 +40,7 @@ echo " 1) Assign Interfaces 8) Shell"
echo " 2) Set interface(s) IP address 9) pfTop"
echo " 3) Reset the root password 10) Filter Logs"
echo " 4) Reset to factory defaults 11) Restart web interface"
echo " 5) Halt system 12) Upgrade from console"
echo " 5) Power off system 12) Upgrade from console"
echo " 6) Reboot system 13) Restore a configuration"
if [ -n "${option99}" ]; then
# flat for alignment...
......
......@@ -32,7 +32,7 @@
<Updates order="10" url="/ui/core/firmware/"/>
<Reporter order="20" url="/crash_reporter.php"/>
<Reboot order="30" url="/reboot.php"/>
<Halt order="40" url="/diag_halt.php"/>
<PowerOff VisibleName="Power Off" order="40" url="/diag_halt.php"/>
<Defaults order="50" url="/diag_defaults.php"/>
</Firmware>
<HighAvailability order="50" VisibleName="High Availability" cssClass="fa fa-refresh fa-fw">
......
......@@ -43,11 +43,11 @@ include('head.inc');
<section class="col-xs-12">
<?php
if (!empty($_POST['Submit'])):
print_info_box(gettext("The system is halting now. This may take one minute.")); ?>
print_info_box(gettext("The system is powering off now.")); ?>
<?php
else: ?>
<form method="post">
<p><strong><?=gettext("Are you sure you want to halt the system?");?></strong></p>
<p><strong><?=gettext("Are you sure you want to power off the system?");?></strong></p>
<div class="btn-group">
<input type="submit" name="Submit" class="btn btn-primary" value="<?=gettext("Yes");?>" />
<a href="/" class="btn btn-default"><?=gettext("No");?></a>
......@@ -61,10 +61,9 @@ include('head.inc');
</section>
<?php include("foot.inc");
// system halt, when submit pressed
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (!empty($_POST['Submit'])) {
system_halt();
}
}
?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment