summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-25 05:08:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-25 05:08:54 +0000
commit29557db23b82cd7ba2a9204e74637a4b142350d0 (patch)
treee7512177ec56a88e508142303673321a9bc39fa8 /usr/local/www/interfaces.php
parentea6b6d7f4eff01e788ec762763ed3d1c9a82cceb (diff)
downloadpfsense-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-xusr/local/www/interfaces.php5
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,
{
OpenPOWER on IntegriCloud