From 26cfb7ebc5fc959ccc272df888117547ea0f48f9 Mon Sep 17 00:00:00 2001 From: janw Date: Fri, 27 May 2005 13:05:49 +0000 Subject: [PATCH] Proxy Options (filter and quota) are now disabled, if assigned checkbox state is not checked. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@480 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../connectivity/class_proxyAccount.inc | 10 +++- plugins/personal/connectivity/proxy.tpl | 47 ++++++++++++++----- 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/plugins/personal/connectivity/class_proxyAccount.inc b/plugins/personal/connectivity/class_proxyAccount.inc index 727082d23..b4766e4dc 100644 --- a/plugins/personal/connectivity/class_proxyAccount.inc +++ b/plugins/personal/connectivity/class_proxyAccount.inc @@ -48,8 +48,10 @@ class proxyAccount extends plugin foreach (array("F", "T", "B", "N") as $val){ if (is_integer(strpos($this->gosaProxyAcctFlags, "$val"))) { $smarty->assign("filter$val", "checked"); + $smarty->assign($val."state", ""); } else { $smarty->assign("filter$val", ""); + $smarty->assign($val."state", "disabled"); } } @@ -154,10 +156,14 @@ class proxyAccount extends plugin /* Save quota values */ if (chkacl ($this->acl, "gosaProxyQuota") == ""){ $old= $this->gosaProxyQuota; - $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"]; + if(isset($_POST["quota_size"]) && isset($_POST["quota_unit"])){ + $this->gosaProxyQuota= $_POST["quota_size"].$_POST["quota_unit"]; + } $this->is_modified= ($old != $this->gosaProxyQuota)?TRUE:$this->is_modified; $old= $this->gosaProxyQuotaPeriod; - $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"]; + if(isset($_POST["gosaProxyQuotaPeriod"])){ + $this->gosaProxyQuotaPeriod = $_POST["gosaProxyQuotaPeriod"]; + } $this->is_modified= ($old != $this->gosaProxyQuotaPeriod)?TRUE:$this->is_modified; } } diff --git a/plugins/personal/connectivity/proxy.tpl b/plugins/personal/connectivity/proxy.tpl index d2403c15d..24650cc0d 100644 --- a/plugins/personal/connectivity/proxy.tpl +++ b/plugins/personal/connectivity/proxy.tpl @@ -1,4 +1,18 @@ -

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

+

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

+
@@ -9,25 +23,31 @@
- + {t}Limit proxy access to working time{/t}
@@ -38,19 +58,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}