summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/interfaces_assign.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-08 22:59:51 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-08 22:59:51 +0545
commitc853233684726b423590edd3e0764462f1184595 (patch)
treeb628ab442fd61fa3b5dfde38b49c1a3b03e20c88 /src/usr/local/www/interfaces_assign.php
parentd13a5e7d616cfd2362d9d4ed95ed28f1bd3e8b1e (diff)
downloadpfsense-c853233684726b423590edd3e0764462f1184595.zip
pfsense-c853233684726b423590edd3e0764462f1184595.tar.gz
print_info_box success
In most situations we want the print_info_box() of $savemsg to be 'success'. If there was some problem saving, then it can be 'warning'. These are a few places I have found so far that need this sort of fixing up - more to come but sleep calls just now! I made the change to index.php also to be consistent with the others, even though it does not actually change anything "for real" because 'warning' is the default anyway. It will make it easy for people in future to see that is the case, specially if they are adding other $savemsg things that need to be 'success'.
Diffstat (limited to 'src/usr/local/www/interfaces_assign.php')
-rw-r--r--src/usr/local/www/interfaces_assign.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php
index 95f949d..0570d39 100644
--- a/src/usr/local/www/interfaces_assign.php
+++ b/src/usr/local/www/interfaces_assign.php
@@ -274,6 +274,7 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
write_config();
$savemsg = gettext("Interface has been added.");
+ $class = "success";
}
} else if (isset($_POST['apply'])) {
@@ -284,12 +285,13 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
write_config();
$retval = filter_configure();
- $savemsg = get_std_save_message($retval);
if (stristr($retval, "error") <> true) {
$savemsg = get_std_save_message($retval);
+ $class = "success";
} else {
$savemsg = $retval;
+ $class = "danger";
}
}
@@ -461,6 +463,7 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
link_interface_to_vlans($realid, "update");
$savemsg = gettext("Interface has been deleted.");
+ $class = "success";
}
}
}
@@ -486,11 +489,14 @@ if (file_exists("/var/run/interface_mismatch_reboot_needed")) {
if ($_POST) {
if ($rebootingnow) {
$savemsg = gettext("The system is now rebooting. Please wait.");
+ $class = "success";
} else {
$savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot.");
+ $class = "warning";
}
} else {
$savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply changes'. The firewall will reboot afterwards.");
+ $class = "warning";
}
}
@@ -499,7 +505,7 @@ if (file_exists("/tmp/reload_interfaces")) {
print_info_box_np(gettext("The interface configuration has been changed.<br />You must apply the changes in order for them to take effect."));
echo "<br /></p>\n";
} elseif ($savemsg) {
- print_info_box($savemsg);
+ print_info_box($savemsg, $class);
}
pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors");
OpenPOWER on IntegriCloud