diff options
author | gnhb <gnoahb@gmail.com> | 2010-05-28 22:46:59 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-05-28 22:46:59 +0700 |
commit | d6366dd7beefba982c1e04a1f43f20cfe306808a (patch) | |
tree | c6a0700d4a0f07ecc1c7067c1a489bd076a0e692 | |
parent | 041b35ccf3ddbd5717d4930581c1b0d8f506f443 (diff) | |
download | pfsense-d6366dd7beefba982c1e04a1f43f20cfe306808a.zip pfsense-d6366dd7beefba982c1e04a1f43f20cfe306808a.tar.gz |
Really fix javascript . . .
-rw-r--r-- | usr/local/www/interfaces_ppps_edit.php | 7 | ||||
-rw-r--r-- | usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php index 5ff7de2..2fe8fa7 100644 --- a/usr/local/www/interfaces_ppps_edit.php +++ b/usr/local/www/interfaces_ppps_edit.php @@ -111,6 +111,7 @@ if (isset($id) && $a_ppps[$id]) { $pconfig['localip'] = explode(",",$a_ppps[$id]['localip']); $pconfig['gateway'] = explode(",",$a_ppps[$id]['gateway']); break; + case "l2tp": case "pptp": $pconfig['localip'] = explode(",",$a_ppps[$id]['localip']); $pconfig['subnet'] = explode(",",$a_ppps[$id]['subnet']); @@ -385,17 +386,17 @@ if ($_POST) { if (isset($_POST['mrru'][$iface])) $mrru_array[] = $_POST['mrru'][$iface]; } - if (count($bw_array)) + if (isset($bw_array)) $ppp['bandwidth'] = implode(',', $bw_array); else unset($ppp['bandwidth']); - if (count($mtu_array)) + if (isset($mtu_array)) $ppp['mtu'] = implode(',', $mtu_array); else unset($ppp['mtu']); - if (count($mru_array)) + if (isset($mru_array)) $ppp['mru'] = implode(',', $mru_array); else unset($ppp['mru']); diff --git a/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js b/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js index 5e8da66..20d0fdd 100644 --- a/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js +++ b/usr/local/www/javascript/interfaces_ppps_edit/ppps_edit.js @@ -26,6 +26,14 @@ function show_hide_linkfields(options){ var port_count = parseInt($('port_count').innerHTML); for(var j=0; j < port_count; j++){ var count = j.toString(); + var link = "link" + count; + var ipfields = "ipfields" + count; + var subnet = "subnet" + count; + $(ipfields,link).invoke('hide'); + $(subnet).disabled = true; + } + for(var j=0; j < options.length; j++){ + var count = select_count.toString(); var type = $('type').value; var link = "link" + count; var lnklabel = "linklabel" + count; @@ -39,7 +47,7 @@ function show_hide_linkfields(options){ var subnet = "subnet" + count; var gateway = "gateway" + count; var gatewaylabel = "gatewaylabel" + count; - + /* $(ipfields,link).invoke('hide'); $(bw).name = "bandwidth[]"; $(mtu).name = "mtu[]"; @@ -48,7 +56,8 @@ function show_hide_linkfields(options){ $(subnet).name = "subnet[]"; $(subnet).disabled = true; $(gateway).name = "gateway[]"; - if (j < options.length && options[j].selected){ + */ + if (options[j].selected){ $(lnklabel).innerHTML = "Link Parameters (" + options[j].value + ")"; $(bwlabel).innerHTML = "Bandwidth (" + options[j].value + ")"; $(bw).name = "bandwidth[" + options[j].value + "]"; |