summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-10-13 20:28:02 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-10-13 20:28:02 -0600
commitf91060852cd28d14fa2cfa100c358e3c4a7fab2c (patch)
tree7209a7011ccb1ef9989414428f011219d227d51d /usr
parentc3f36fb53d7fca4873e1317d9e171bebb3577436 (diff)
downloadpfsense-f91060852cd28d14fa2cfa100c358e3c4a7fab2c.zip
pfsense-f91060852cd28d14fa2cfa100c358e3c4a7fab2c.tar.gz
Hide translation section when "Do not NAT" is checked. Fixes #952
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/firewall_nat_out_edit.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php
index 2a492cd..97d50e1 100755
--- a/usr/local/www/firewall_nat_out_edit.php
+++ b/usr/local/www/firewall_nat_out_edit.php
@@ -293,6 +293,13 @@ function sourcesel_change() {
break;
}
}
+function nonat_change() {
+ if (document.iform.nonat.checked) {
+ document.getElementById("transtable").style.display = 'none';
+ } else {
+ document.getElementById("transtable").style.display = '';
+ }
+}
//-->
</script>
</head>
@@ -308,7 +315,7 @@ function sourcesel_change() {
<tr>
<td width="22%" valign="top" class="vncell"><?=gettext("Do not NAT");?></td>
<td width="78%" class="vtable">
- <input type="checkbox" name="nonat"<?php if(isset($pconfig['nonat'])) echo " CHECKED"; ?>>
+ <input type="checkbox" name="nonat" id="nonat" onClick="nonat_change();" <?php if(isset($pconfig['nonat'])) echo " CHECKED"; ?>>
<span class="vexpl"><?=gettext("Enabling this option will disable NAT for traffic matching this rule and stop processing Outbound NAT rules.");?>
<br><?=gettext("Hint: in most cases, you won't use this option.");?></span></td>
</tr>
@@ -434,7 +441,7 @@ any)");?></td>
</table>
</td>
</tr>
- <tr>
+ <tr name="transtable" id="transtable">
<td width="22%" valign="top" class="vncell"><?=gettext("Translation");?></td>
<td width="78%" class="vtable">
<table border="0" cellspacing="1" cellpadding="1">
@@ -514,6 +521,7 @@ any)");?></td>
sourcesel_change();
typesel_change();
staticportchange();
+nonat_change();
//-->
</script>
<?php include("fend.inc"); ?>
OpenPOWER on IntegriCloud