summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteve Beaver <sbeaver@netgate.com>2017-08-21 08:30:12 -0400
committerSteve Beaver <sbeaver@netgate.com>2017-08-21 08:30:56 -0400
commit25b82b200de7e846066bef3c6a3918592527763f (patch)
tree33278b75bf27bf54aa881c232f9fd6ee85b835f5 /src
parent2e6e11f45c9fc9bb62f3fc2c5cbc98f42ea48489 (diff)
downloadpfsense-25b82b200de7e846066bef3c6a3918592527763f.zip
pfsense-25b82b200de7e846066bef3c6a3918592527763f.tar.gz
Fixed #7728
Revised enabled/disabled diplay to match other firewall pages
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/firewall_nat_1to1.php31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php
index 77684cd..dea3ddd 100644
--- a/src/usr/local/www/firewall_nat_1to1.php
+++ b/src/usr/local/www/firewall_nat_1to1.php
@@ -136,6 +136,7 @@ $tab_array[] = array(gettext("1:1"), true, "firewall_nat_1to1.php");
$tab_array[] = array(gettext("Outbound"), false, "firewall_nat_out.php");
$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
display_top_tabs($tab_array);
+
?>
<form action="firewall_nat_1to1.php" method="post">
<div class="panel panel-default">
@@ -156,18 +157,22 @@ display_top_tabs($tab_array);
</thead>
<tbody class="user-entries">
<?php
- $textse = "</span>";
$i = 0;
foreach ($a_1to1 as $natent):
if (isset($natent['disabled'])) {
- $textss = "<span class=\"gray\">";
$iconfn = "pass_d";
} else {
- $textss = "<span>";
$iconfn = "pass";
}
+
+ $alias = rule_columns_with_alias(
+ $natent['source']['address'],
+ pprint_port($natent['source']['port']),
+ $natent['destination']['address'],
+ pprint_port($natrent['destination']['port'])
+);
?>
- <tr id="fr<?=$i;?>" onClick="fr_toggle(<?=$i;?>)" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';">
+ <tr id="fr<?=$i;?>" onClick="fr_toggle(<?=$i;?>)" ondblclick="document.location='firewall_nat_1to1_edit.php?id=<?=$i;?>';" <?=(isset($natent['disabled']) ? ' class="disabled"' : '')?>>
<td >
<input type="checkbox" id="frc<?=$i;?>" onClick="fr_toggle(<?=$i;?>)" name="rule[]" value="<?=$i;?>"/>
</td>
@@ -182,35 +187,37 @@ display_top_tabs($tab_array);
</td>
<td>
<?php
- echo $textss;
if (!$natent['interface']) {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
} else {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
}
- echo $textse;
?>
</td>
<td>
<?php
$source_net = pprint_address($natent['source']);
$source_cidr = strstr($source_net, '/');
- echo $textss . $natent['external'] . $source_cidr . $textse;
+ echo $natent['external'] . $source_cidr;
?>
</td>
<td>
<?php
- echo $textss . $source_net . $textse;
+ echo $source_net;
?>
</td>
<td>
-<?php
- echo $textss . pprint_address($natent['destination']) . $textse;
-?>
+ <?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">
+ <?=str_replace('_', '_<wbr>', htmlspecialchars(pprint_address($natent['destination'])))?>
+ </a>
+ <?php else: ?>
+ <?=htmlspecialchars(pprint_address($natent['destination']))?>
+ <?php endif; ?>
</td>
<td>
<?php
- echo $textss . htmlspecialchars($natent['descr']) . '&nbsp;' . $textse;
+ echo htmlspecialchars($natent['descr']) . '&nbsp;';
?>
</td>
OpenPOWER on IntegriCloud