summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_wol.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-11 23:25:01 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-11 23:25:01 +0545
commitf78bbe1679140cf6a42fa9b55624b1f54466dd1e (patch)
treecf099abfbd1aae914281b6a0904f1cd51af96b99 /src/usr/local/www/services_wol.php
parentd7ac2a6d933bfb2cd2ff949a1619d04080423ac5 (diff)
downloadpfsense-f78bbe1679140cf6a42fa9b55624b1f54466dd1e.zip
pfsense-f78bbe1679140cf6a42fa9b55624b1f54466dd1e.tar.gz
Redmine #5759 print_info_box style
Define the 'success' 'info' etc style of calls to print_info_box()
Diffstat (limited to 'src/usr/local/www/services_wol.php')
-rw-r--r--src/usr/local/www/services_wol.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php
index 8d91c19..606234f 100644
--- a/src/usr/local/www/services_wol.php
+++ b/src/usr/local/www/services_wol.php
@@ -84,8 +84,10 @@ if ($_GET['wakeall'] != "") {
/* Execute wol command and check return code. */
if (!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")) {
$savemsg .= sprintf(gettext('Sent magic packet to %1$s (%2$s)%3$s'), $mac, $description, ".<br />");
+ $class = 'success';
} else {
$savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully%5$s'), '<a href="/status_logs.php">', '</a>', $description, $mac, ".<br />");
+ $class = 'warning';
}
}
}
@@ -123,8 +125,10 @@ if ($_POST || $_GET['mac']) {
/* Execute wol command and check return code. */
if (!mwexec("/usr/local/bin/wol -i {$bcip} " . escapeshellarg($mac))) {
$savemsg .= sprintf(gettext("Sent magic packet to %s."), $mac);
+ $class = 'success';
} else {
$savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'), '<a href="/status_logs.php">', '</a>', $mac, ".<br />");
+ $class = 'warning';
}
}
}
@@ -141,12 +145,15 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Services"), gettext("Wake on LAN"));
include("head.inc");
-
+?>
+<div class="infoblock_open">
+<?php
print_info_box(gettext('This service can be used to wake up (power on) computers by sending special') . ' "' . gettext('Magic Packets') . '"<br />' .
- gettext('The NIC in the computer that is to be woken up must support Wake on LAN and must be properly configured (WOL cable, BIOS settings).'));
+ gettext('The NIC in the computer that is to be woken up must support Wake on LAN and must be properly configured (WOL cable, BIOS settings).'),
+ 'info');
?>
-
+</div>
<?php
if ($input_errors) {
@@ -154,7 +161,7 @@ if ($input_errors) {
}
if ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
$form = new Form('Send');
OpenPOWER on IntegriCloud