diff options
author | Ermal <eri@pfsense.org> | 2010-11-25 12:29:03 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-11-25 12:29:03 +0000 |
commit | a980df9c1b8e839880295d37f6fba990cb98a30c (patch) | |
tree | 187214f91761e071cfed29efde88cc15b982086e /usr/local/www | |
parent | e1b17c7a63310248e6e70cde88bf0824b9f1894c (diff) | |
download | pfsense-a980df9c1b8e839880295d37f6fba990cb98a30c.zip pfsense-a980df9c1b8e839880295d37f6fba990cb98a30c.tar.gz |
Resolves #1040. Fix dynamic addition of gateways from routes edit screen.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/system_routes_edit.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/local/www/system_routes_edit.php b/usr/local/www/system_routes_edit.php index f2ca993..3ca0de9 100755 --- a/usr/local/www/system_routes_edit.php +++ b/usr/local/www/system_routes_edit.php @@ -206,7 +206,7 @@ include("head.inc"); </tr> <tr><td> </td> <tr> - <td width="45%" align="right"><font color="white"><?=gettext("Default gateway:"); ?></td><td><input type="checkbox" id="defaultgw" name="defaultgw"<?=$checked?>></td> + <td width="45%" align="right"><font color="white"><?=gettext("Default gateway:"); ?></td><td><input type="checkbox" id="defaultgw" name="defaultgw"></td> </tr> <tr> <td width="45%" align="right"><font color="white"><?=gettext("Interface:"); ?></td> @@ -291,7 +291,9 @@ include("head.inc"); var descr = $('gatewaydescr').getValue(); gatewayip = $('gatewayip').getValue(); addrtype = $('addrtype').getValue(); - var defaultgw = $('defaultgw').getValue(); + var defaultgw = ''; + if ($('defaultgw').checked) + defaultgw = 'yes'; 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) + '&type=' + escape(addrtype); var myAjax = new Ajax.Request( @@ -310,7 +312,7 @@ include("head.inc"); optn.value = value; selectbox.options.add(optn); selectbox.selectedIndex = (selectbox.options.length-1); - $('notebox').innerHTML="<p/><strong><?=gettext("NOTE:");?></strong> <?php printf(gettext("You can manage Gateways %shere%s."), "<a target='_new' href='system_gateways.php'>", "</a>");?> + $('notebox').innerHTML="<p/><strong><?=gettext("NOTE:");?></strong> <?php printf(gettext("You can manage Gateways %shere%s."), "<a target='_new' href='system_gateways.php'>", "</a>");?> </strong>"; } function report_failure() { alert("<?=gettext("Sorry, we could not create your gateway at this time."); ?>"); |