diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-11-25 05:08:54 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-11-25 05:08:54 +0000 |
commit | 29557db23b82cd7ba2a9204e74637a4b142350d0 (patch) | |
tree | e7512177ec56a88e508142303673321a9bc39fa8 /usr/local/www/interfaces.php | |
parent | ea6b6d7f4eff01e788ec762763ed3d1c9a82cceb (diff) | |
download | pfsense-29557db23b82cd7ba2a9204e74637a4b142350d0.zip pfsense-29557db23b82cd7ba2a9204e74637a4b142350d0.tar.gz |
If the interface is wan, select the default gw box automatically
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-x | usr/local/www/interfaces.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index b000994..85b92ae 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -1425,8 +1425,11 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe" name = $('name').getValue(); var descr = $('gatewaydescr').getValue(); gatewayip = $('gatewayip').getValue(); + var defaultgw; + if(iface == 'wan' || iface == 'WAN') + defaultgw = 'checked'; var url = "system_gateways_edit.php"; - var pars = 'isAjax=true&interface=' + escape(iface) + '&name=' + escape(name) + '&descr=' + escape(descr) + '&gateway=' + escape(gatewayip); + var pars = 'isAjax=true&defaultgw=' + escape(defaultgw) + '&interface=' + escape(iface) + '&name=' + escape(name) + '&descr=' + escape(descr) + '&gateway=' + escape(gatewayip); var myAjax = new Ajax.Request( url, { |