diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-07-24 16:23:06 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-07-24 16:23:06 -0300 |
commit | 7fa503d8f25b161d2d33e63aa7fda9a5bf4c2bd3 (patch) | |
tree | 995d83697ce1f67a329d3142e8adb98a391b5bfc /usr/local | |
parent | 140ed85e94a5b182b59dabf26e416cb4f36fba45 (diff) | |
download | pfsense-7fa503d8f25b161d2d33e63aa7fda9a5bf4c2bd3.zip pfsense-7fa503d8f25b161d2d33e63aa7fda9a5bf4c2bd3.tar.gz |
Fix #3103, cleanup ports fields when protocol changes
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_nat_edit.php | 6 | ||||
-rw-r--r-- | usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js | 6 |
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 a9399f8..42da1ba 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:"); ?> </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 = ""; } } |