summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-07-24 16:23:06 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-07-24 16:23:38 -0300
commit68c11b29141fec71a7df753bd81a986270d41a49 (patch)
tree435ef6bd7b13a50f13a20d05f57fb2c62162ecf7
parente7b5a0577926ee2cc262b7f99d245a5b8face065 (diff)
downloadpfsense-68c11b29141fec71a7df753bd81a986270d41a49.zip
pfsense-68c11b29141fec71a7df753bd81a986270d41a49.tar.gz
Fix #3103, cleanup ports fields when protocol changes
-rwxr-xr-xusr/local/www/firewall_nat_edit.php6
-rw-r--r--usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js6
2 files changed, 9 insertions, 3 deletions
diff --git a/usr/local/www/firewall_nat_edit.php b/usr/local/www/firewall_nat_edit.php
index 87de18f..7d6b974 100755
--- a/usr/local/www/firewall_nat_edit.php
+++ b/usr/local/www/firewall_nat_edit.php
@@ -718,7 +718,7 @@ include("fbegin.inc"); ?>
<tr>
<td><?=gettext("from:"); ?>&nbsp;&nbsp;</td>
<td>
- <select name="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
+ <select name="dstbeginport" id="dstbeginport" class="formselect" onchange="dst_rep_change();ext_change()">
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
@@ -731,7 +731,7 @@ include("fbegin.inc"); ?>
<tr>
<td><?=gettext("to:"); ?></td>
<td>
- <select name="dstendport" class="formselect" onchange="ext_change()">
+ <select name="dstendport" id="dstendport" class="formselect" onchange="ext_change()">
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0;
foreach ($wkports as $wkport => $wkportdesc): ?>
@@ -761,7 +761,7 @@ include("fbegin.inc"); ?>
<tr name="lprtr" id="lprtr">
<td width="22%" valign="top" class="vncellreq"><?=gettext("Redirect target port"); ?></td>
<td width="78%" class="vtable">
- <select name="localbeginport" class="formselect" onchange="ext_change();check_for_aliases();">
+ <select name="localbeginport" id="localbeginport" class="formselect" onchange="ext_change();check_for_aliases();">
<option value="">(<?=gettext("other"); ?>)</option>
<?php $bfound = 0; foreach ($wkports as $wkport => $wkportdesc): ?>
<option value="<?=$wkport;?>" <?php if ($wkport == $pconfig['localbeginport']) {
diff --git a/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js b/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js
index bd88145..501481d 100644
--- a/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js
+++ b/usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js
@@ -138,6 +138,12 @@ function proto_change() {
document.getElementById("sprtable").style.display = 'none';
document.getElementById("dprtr").style.display = 'none';
document.getElementById("lprtr").style.display = 'none';
+ document.getElementById("dstbeginport").selectedIndex = 0;
+ document.getElementById("dstbeginport_cust").value = "";
+ document.getElementById("dstendport").selectedIndex = 0;
+ document.getElementById("dstendport_cust").value = "";
+ document.getElementById("localbeginport").selectedIndex = 0;
+ document.getElementById("localbeginport_cust").value = "";
}
}
OpenPOWER on IntegriCloud