From: janw Date: Tue, 31 May 2005 10:51:47 +0000 (+0000) Subject: Added on-the-fly state-changing of proxy checkboxes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c5104efada8f789dd4c0ac7c43e0d6c38208ceae;p=gosa.git 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 --- 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}
- +   - {html_options options=$quota_unit selected=$quota_u} {t}per{/t} - {html_options options=$quota_time selected=$gosaProxyQuotaPeriod}