From 2648fa63b8c0a56a5b1e069f0349da915b01fcc5 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 27 Apr 2010 09:03:23 -0300 Subject: Automatically select destination as $Interface address when Interface is changed just for new rules, or, if previous rule has already the combination interface + interface address selected --- usr/local/www/javascript/firewall_nat_edit/firewall_nat_edit.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr/local/www/javascript/firewall_nat_edit') 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 2cc7d7f..9f21c2b 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 @@ -177,7 +177,9 @@ function dst_rep_change() { document.iform.dstendport.selectedIndex = document.iform.dstbeginport.selectedIndex; } -function dst_change( iface ) { - document.iform.dsttype.value = iface.concat("ip"); +function dst_change( iface, old_iface, old_dst ) { + if ( ( old_dst == "" ) || ( old_iface.concat("ip") == old_dst ) ) { + document.iform.dsttype.value = iface.concat("ip"); + } } //--> -- cgit v1.1