summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xusr/local/www/interfaces.php4
-rwxr-xr-xusr/local/www/system_gateways_edit.php5
2 files changed, 8 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 2916857..c302232 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -948,6 +948,7 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe"
<td colspan="2">
<center>
<div id='savebuttondiv'>
+ <input type="hidden" name="addrtype" id="addrtype" value="IPv4" />
<input id="gwsave" type="Button" value="Save Gateway" onClick='hide_add_gatewaysave();'>
<input id="gwcancel" type="Button" value="Cancel" onClick='hide_add_gateway();'>
</div>
@@ -1579,9 +1580,10 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "pppoe"
name = $('name').getValue();
var descr = $('gatewaydescr').getValue();
gatewayip = $('gatewayip').getValue();
+ addrtype = $('addrtype').getValue();
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 pars = 'isAjax=true&defaultgw=' + escape(defaultgw) + '&interface=' + escape(iface) + '&name=' + escape(name) + '&descr=' + escape(descr) + '&gateway=' + escape(gatewayip) + '&type=' + escape(addrtype);
var myAjax = new Ajax.Request(
url,
{
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 9d64f01..15b60e1 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -158,6 +158,11 @@ if ($_POST) {
write_config();
+ if($_REQUEST['isAjax']) {
+ echo $_POST['name'];
+ exit;
+ }
+
header("Location: system_gateways.php");
exit;
}
OpenPOWER on IntegriCloud