From 5db29ca79323a2d7e8b002f66f08168f2a797e7a Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Tue, 19 Jan 2016 16:56:43 +0545 Subject: Fixup firewall rules schedule status images 1) $iconfn is not the var that contains the 'type' of block or reject. 2) In the bottom if-else of the diff "times-circle" was repeated twice. 3) It seemed odd to me that wen the schedule was out of its time that the icons would always be in "text-danger" color. My suggestion, make them "text-warning" which distinguishes them from the green or red that is shown when the schedule is active. --- src/usr/local/www/firewall_rules.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index 615f3bc..f416353 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -528,7 +528,7 @@ for ($i = 0; isset($a_filter[$i]); $i++): $image = ""; if (!isset($filterent['disabled'])) { if ($schedstatus) { - if ($iconfn == "block" || $iconfn == "reject") { + if ($filterent['type'] == "block" || $filterent['type'] == "reject") { $image = "times-circle"; $dispcolor = "text-danger"; $alttext = gettext("Traffic matching this rule is currently being denied"); @@ -539,13 +539,13 @@ for ($i = 0; isset($a_filter[$i]); $i++): } $printicon = true; } else if ($filterent['sched']) { - if ($iconfn == "block" || $iconfn == "reject") { + if ($filterent['type'] == "block" || $filterent['type'] == "reject") { $image = "times-circle"; } else { - $image = "times-circle"; + $image = "play-circle"; } $alttext = gettext("This rule is not currently active because its period has expired"); - $dispcolor = "text-danger"; + $dispcolor = "text-warning"; $printicon = true; } } -- cgit v1.1