diff options
author | NOYB <Al_Stu@Frontier.com> | 2016-04-14 01:22:21 -0700 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-04-18 11:18:55 -0400 |
commit | faa020a3999e24bed9ca4294604f425b6188edfd (patch) | |
tree | 3c37aaab9245c41093672c43b2ac87f6ec1fd316 | |
parent | c228156fc41eae97128dca078b518eb7b4e96b35 (diff) | |
download | pfsense-faa020a3999e24bed9ca4294604f425b6188edfd.zip pfsense-faa020a3999e24bed9ca4294604f425b6188edfd.tar.gz |
Firewall / Rules - Underscore Line Wrap
Replace underscore with space in display text of certain fields to allow them to line wrap. ex: long alias names
(cherry picked from commit ece727a7b64a8766ad3087f8f59c0f1784e7a514)
-rw-r--r-- | src/usr/local/www/firewall_nat.php | 12 | ||||
-rw-r--r-- | src/usr/local/www/firewall_nat_out.php | 8 | ||||
-rw-r--r-- | src/usr/local/www/firewall_rules.php | 18 |
3 files changed, 19 insertions, 19 deletions
diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php index 836bc65..89a42f2 100644 --- a/src/usr/local/www/firewall_nat.php +++ b/src/usr/local/www/firewall_nat.php @@ -336,7 +336,7 @@ foreach ($a_nat as $natent): <?php endif; ?> - <?=htmlspecialchars(pprint_address($natent['source']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_address($natent['source'])))?> <?php if (isset($alias['src'])): ?> @@ -353,7 +353,7 @@ foreach ($a_nat as $natent): <?php endif; ?> - <?=htmlspecialchars(pprint_port($natent['source']['port']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_port($natent['source']['port'])))?> <?php if (isset($alias['srcport'])): ?> @@ -371,7 +371,7 @@ foreach ($a_nat as $natent): <?php endif; ?> - <?=htmlspecialchars(pprint_address($natent['destination']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_address($natent['destination'])))?> <?php if (isset($alias['dst'])): ?> @@ -388,7 +388,7 @@ foreach ($a_nat as $natent): <?php endif; ?> - <?=htmlspecialchars(pprint_port($natent['destination']['port']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_port($natent['destination']['port'])))?> <?php if (isset($alias['dstport'])): ?> @@ -399,7 +399,7 @@ foreach ($a_nat as $natent): </td> <td > - <?=htmlspecialchars($natent['target'])?> + <?=str_replace('_', ' ', htmlspecialchars($natent['target']))?> </td> <td> <?php @@ -412,7 +412,7 @@ foreach ($a_nat as $natent): $localport .= '-' . $localendport; } ?> - <?=htmlspecialchars(pprint_port($localport))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_port($localport)))?> </td> <td> diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php index 442bb12..ff63fec 100644 --- a/src/usr/local/www/firewall_nat_out.php +++ b/src/usr/local/www/firewall_nat_out.php @@ -384,7 +384,7 @@ print($form); <?php endif; ?> - <?=htmlspecialchars($natent['source']['network'])?> + <?=str_replace('_', ' ', htmlspecialchars($natent['source']['network']))?> <?php if (isset($alias['src'])): ?> @@ -407,7 +407,7 @@ print($form); <?php endif; ?> - <?=htmlspecialchars($natent['sourceport'])?> + <?=str_replace('_', ' ', htmlspecialchars($natent['sourceport']))?> <?php if (isset($alias['srcport'])): ?> @@ -434,7 +434,7 @@ print($form); <?php endif; ?> - <?=htmlspecialchars($natent['destination']['address'])?> + <?=str_replace('_', ' ', htmlspecialchars($natent['destination']['address']))?> <?php if (isset($alias['dst'])): ?> @@ -458,7 +458,7 @@ print($form); <?php endif; ?> - <?=htmlspecialchars($natent['dstport'])?> + <?=str_replace('_', ' ', htmlspecialchars($natent['dstport']))?> <?php if (isset($alias['dstport'])): ?> diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index 6ba27c2..a431765 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -726,7 +726,7 @@ foreach ($a_filter as $filteri => $filterent): <td> <?php if (isset($alias['src'])): ?> <a href="/firewall_aliases_edit.php?id=<?=$alias['src']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['src'])?>" data-html="true"> - <?=htmlspecialchars(pprint_address($filterent['source']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_address($filterent['source'])))?> </a> <?php else: ?> <?=htmlspecialchars(pprint_address($filterent['source']))?> @@ -735,7 +735,7 @@ foreach ($a_filter as $filteri => $filterent): <td> <?php if (isset($alias['srcport'])): ?> <a href="/firewall_aliases_edit.php?id=<?=$alias['srcport']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['srcport'])?>" data-html="true"> - <?=htmlspecialchars(pprint_port($filterent['source']['port']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_port($filterent['source']['port'])))?> </a> <?php else: ?> <?=htmlspecialchars(pprint_port($filterent['source']['port']))?> @@ -744,7 +744,7 @@ foreach ($a_filter as $filteri => $filterent): <td> <?php if (isset($alias['dst'])): ?> <a href="/firewall_aliases_edit.php?id=<?=$alias['dst']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['dst'])?>" data-html="true"> - <?=htmlspecialchars(pprint_address($filterent['destination']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_address($filterent['destination'])))?> </a> <?php else: ?> <?=htmlspecialchars(pprint_address($filterent['destination']))?> @@ -753,7 +753,7 @@ foreach ($a_filter as $filteri => $filterent): <td> <?php if (isset($alias['dstport'])): ?> <a href="/firewall_aliases_edit.php?id=<?=$alias['dstport']?>" data-toggle="popover" data-trigger="hover focus" title="<?=gettext('Alias details')?>" data-content="<?=alias_info_popup($alias['dstport'])?>" data-html="true"> - <?=htmlspecialchars(pprint_port($filterent['destination']['port']))?> + <?=str_replace('_', ' ', htmlspecialchars(pprint_port($filterent['destination']['port'])))?> </a> <?php else: ?> <?=htmlspecialchars(pprint_port($filterent['destination']['port']))?> @@ -761,7 +761,7 @@ foreach ($a_filter as $filteri => $filterent): </td> <td> <?php if (isset($config['interfaces'][$filterent['gateway']]['descr'])):?> - <?=htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr'])?> + <?=str_replace('_', ' ', htmlspecialchars($config['interfaces'][$filterent['gateway']]['descr']))?> <?php else: ?> <?=htmlspecialchars(pprint_port($filterent['gateway']))?> <?php endif; ?> @@ -769,12 +769,12 @@ foreach ($a_filter as $filteri => $filterent): <td> <?php if (isset($filterent['ackqueue']) && isset($filterent['defaultqueue'])) { - $desc = $filterent['ackqueue'] ; + $desc = str_replace('_', ' ', $filterent['ackqueue']); echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['ackqueue']}&action=show\">{$desc}</a>"; - $desc = $filterent['defaultqueue']; + $desc = str_replace('_', ' ', $filterent['defaultqueue']); echo "/<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>"; } else if (isset($filterent['defaultqueue'])) { - $desc = $filterent['defaultqueue']; + $desc = str_replace('_', ' ', $filterent['defaultqueue']); echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&action=show\">{$desc}</a>"; } else { echo gettext("none"); @@ -785,7 +785,7 @@ foreach ($a_filter as $filteri => $filterent): <?php if ($printicon) { ?> <i class="fa fa-<?=$image?> <?=$dispcolor?>" title="<?=$alttext;?>"></i> <?php } ?> - <?=$schedule_span_begin;?><?=htmlspecialchars($filterent['sched']);?> <?=$schedule_span_end;?> + <?=$schedule_span_begin;?><?=str_replace('_', ' ', htmlspecialchars($filterent['sched']));?> <?=$schedule_span_end;?> </td> <td> <?=htmlspecialchars($filterent['descr']);?> |