From c5104efada8f789dd4c0ac7c43e0d6c38208ceae Mon Sep 17 00:00:00 2001 From: janw Date: Tue, 31 May 2005 10:51:47 +0000 Subject: [PATCH] Added on-the-fly state-changing of proxy checkboxes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@531 594d385d-05f5-0310-b6e9-bd551577e9d8 --- html/include/focus.js | 18 +++++++ .../connectivity/class_proxyAccount.inc | 7 +++ plugins/personal/connectivity/proxy.tpl | 49 ++++++++++++------- 3 files changed, 55 insertions(+), 19 deletions(-) diff --git a/html/include/focus.js b/html/include/focus.js index 48f7e738e..978939c84 100644 --- a/html/include/focus.js +++ b/html/include/focus.js @@ -39,6 +39,24 @@ function changeSelectState(triggerField, myField) { } } +function changeSubselectState(triggerField, myField) { + if (document.getElementById(triggerField).checked == true){ + document.getElementById(myField).disabled= false; + } else { + document.getElementById(myField).disabled= true; + } +} + +function changeTripleSelectState(firstTriggerField, secondTriggerField, myField) { + if ( + document.getElementById(firstTriggerField).checked == true && + document.getElementById(secondTriggerField).checked == true){ + document.getElementById(myField).disabled= false; + } else { + document.getElementById(myField).disabled= true; + } +} + document.onkeydown= keyDown; // work together to analyze keystrokes if (netscape){ document.captureEvents(Event.KEYDOWN|Event.KEYUP); diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index acc6ebf9d..a097972dd 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -48,8 +48,15 @@ class proxyAccount extends plugin foreach (array("F", "T", "B", "N") as $val){ if (is_integer(strpos($this->gosaProxyAcctFlags, "$val"))) { $smarty->assign("filter$val", "checked"); + + /* Add state variables for on-the-fly state-changing of checkboxes */ + $smarty->assign($val."state", ""); + } else { $smarty->assign("filter$val", ""); + + /* Same as above */ + $smarty->assign($val."state", "disabled"); } } diff --git a/plugins/personal/connectivity/proxy.tpl b/plugins/personal/connectivity/proxy.tpl index 07f89580b..8fed11564 100644 --- a/plugins/personal/connectivity/proxy.tpl +++ b/plugins/personal/connectivity/proxy.tpl @@ -1,17 +1,17 @@

{if $tabbed eq 1} - {/if}{t}Proxy account{/t}

@@ -25,25 +25,31 @@ - + {t}Limit proxy access to working time{/t}
@@ -54,19 +60,24 @@  
- {html_options values=$hours output=$hours selected=$starthour}  :  - {html_options values=$minutes output=$minutes selected=$startminute}  -  - {html_options values=$hours output=$hours selected=$stophour}  :  - {html_options values=$minutes output=$minutes selected=$stopminute} - + {t}Restrict proxy usage by quota{/t}
-- 2.30.2
- +   - {html_options options=$quota_unit selected=$quota_u} {t}per{/t} - {html_options options=$quota_time selected=$gosaProxyQuotaPeriod}