summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-11-03 08:45:20 +0545
committerPhil Davis <phil.davis@inf.org>2015-11-03 08:45:20 +0545
commit8c3b999ecc81dbff1e6fc23c92c649548cf5dc34 (patch)
tree3d4bb784cd3db0114ca19a4bd7a2eca7efb790d9
parentf0ac86217ca827ee0203cabfe50bca80a50bb185 (diff)
downloadpfsense-8c3b999ecc81dbff1e6fc23c92c649548cf5dc34.zip
pfsense-8c3b999ecc81dbff1e6fc23c92c649548cf5dc34.tar.gz
diag_logs_filter_dynamic reduce duplicated icon code
Almost all the code in old lines 408 and 413 was the same. Make the logic a bit clearer about exactly what is the difference and hopefully reduce future code maintenance issues.
-rwxr-xr-xsrc/usr/local/www/diag_logs_filter_dynamic.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/usr/local/www/diag_logs_filter_dynamic.php b/src/usr/local/www/diag_logs_filter_dynamic.php
index 2c4d7b3..03ab0e1 100755
--- a/src/usr/local/www/diag_logs_filter_dynamic.php
+++ b/src/usr/local/www/diag_logs_filter_dynamic.php
@@ -404,17 +404,12 @@ display_top_tabs($tab_array, false, 'nav nav-tabs');
<td>
<?php
if ($filterent['act'] == "block") {
-?>
- <i class="fa fa-times icon-danger icon-pointer" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"></i>
-<?php
- }
- else {
-?>
- <i class="fa fa-check icon-success icon-pointer" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"></i>
-<?php
+ $icon_act = "fa-times icon-danger";
+ } else {
+ $icon_act = "fa-check icon-success";
}
?>
-
+ <i class="fa <?php echo $icon_act;?> icon-pointer" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"></i>
</td>
</tr>
<?php
OpenPOWER on IntegriCloud