diff options
author | Colin Smith <colin@pfsense.org> | 2005-03-08 04:02:30 +0000 |
---|---|---|
committer | Colin Smith <colin@pfsense.org> | 2005-03-08 04:02:30 +0000 |
commit | 908ee21828bc8391d291fecb624e1dfda2fac1e3 (patch) | |
tree | ee7017821de6db23fb1a07db55628629263e4390 /usr/local/www/services_captiveportal.php | |
parent | 7b4b2eb7a793ba86b8623209feb238fe2c045979 (diff) | |
download | pfsense-908ee21828bc8391d291fecb624e1dfda2fac1e3.zip pfsense-908ee21828bc8391d291fecb624e1dfda2fac1e3.tar.gz |
* Add enable_peruserbw() to determine whether or not per-user bandwidth fields should be grayed out.
* Call this from enable_change() to set these values when the page is first accessed.
Diffstat (limited to 'usr/local/www/services_captiveportal.php')
-rwxr-xr-x | usr/local/www/services_captiveportal.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php index 1e79af6..63b47b8 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -219,6 +219,24 @@ function enable_https() { } } +function enable_peruserbw() { + if (document.iform.peruserbw.checked == false) { + document.iform.bwauthmacdn.disabled = 1; + document.iform.bwauthmacup.disabled = 1; + document.iform.bwauthipdn.disabled = 1; + document.iform.bwauthipup.disabled = 1; + document.iform.bwdefaultdn.disabled = 1; + document.iform.bwdefaultup.disabled = 1; + } else { + document.iform.bwauthmacdn.disabled = 0; + document.iform.bwauthmacup.disabled = 0; + document.iform.bwauthipdn.disabled = 0; + document.iform.bwauthipup.disabled = 0; + document.iform.bwdefaultdn.disabled = 0; + document.iform.bwdefaultup.disabled = 0; + } +} + function enable_change(enable_change) { var endis; endis = !(document.iform.enable.checked || enable_change); @@ -260,6 +278,7 @@ function enable_change(enable_change) { auth_method_change(); enable_https(); + enable_peruserbw(); } //--> @@ -340,7 +359,7 @@ to access after they've authenticated.</td> <tr> <td valign="top" class="vncell">Per-user bandwidth restriction</td> <td class="vtable"> - <input name="peruserbw" type="checkbox" class="formfld" id="peruserbw" value="yes" <?php if ($pconfig['peruserbw']) echo "checked"; ?>> + <input name="peruserbw" type="checkbox" class="formfld" id="peruserbw" value="yes" <?php if ($pconfig['peruserbw']) echo "checked"; ?> onClick="enable_peruserbw()"> <strong>Enable per-user bandwidth restriction </strong><br><br> <table cellpadding="0" cellspacing="0"> <tr> |