summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-11-25 05:12:49 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-11-25 05:12:49 +0000
commit67c90792e5e0fbdcf1c4fa58a0607ed4d62cbc0d (patch)
tree0ff930eacac07b5737eb3f1f24c61d012fa4b07b /usr/local/www/interfaces.php
parent29557db23b82cd7ba2a9204e74637a4b142350d0 (diff)
downloadpfsense-67c90792e5e0fbdcf1c4fa58a0607ed4d62cbc0d.zip
pfsense-67c90792e5e0fbdcf1c4fa58a0607ed4d62cbc0d.tar.gz
Add default gw box, check it by default if the interface is wan
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-xusr/local/www/interfaces.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 85b92ae..9321b01 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -871,6 +871,13 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe"
<td colspan="2"><center><b><font color="white">Add new gateway:</b></center></td>
</tr>
<tr><td>&nbsp;</td>
+ <?php
+ if($if == "wan" || $if == "WAN")
+ $checked = " CHECKED";
+ ?>
+ <tr>
+ <td align="right"><font color="white">Default gateway:</td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td>
+ </tr>
<tr>
<td align="right"><font color="white">Name:</td><td><input id="name" name="name"></td>
</tr>
@@ -1425,9 +1432,7 @@ $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 defaultgw = $('defaultgw').getValue();
var url = "system_gateways_edit.php";
var pars = 'isAjax=true&defaultgw=' + escape(defaultgw) + '&interface=' + escape(iface) + '&name=' + escape(name) + '&descr=' + escape(descr) + '&gateway=' + escape(gatewayip);
var myAjax = new Ajax.Request(
OpenPOWER on IntegriCloud