From 908ee21828bc8391d291fecb624e1dfda2fac1e3 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Tue, 8 Mar 2005 04:02:30 +0000 Subject: * 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. --- usr/local/www/services_captiveportal.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'usr/local/www/services_captiveportal.php') 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. Per-user bandwidth restriction - > + onClick="enable_peruserbw()"> Enable per-user bandwidth restriction

-- cgit v1.1