From 5f036e3c3bea7a868a7edb5b3f8cea2fe74db54c Mon Sep 17 00:00:00 2001 From: hzerres Date: Mon, 25 Oct 2010 11:47:46 +0000 Subject: [PATCH] added state changes and disabled state for checkbox-input filed combination. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20139 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../personal/groupware/class_Groupware.inc | 20 +++++++++------- .../groupware/personal/groupware/generic.tpl | 24 +++++++++---------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc index 1445b4b98..01141cd9c 100644 --- a/gosa-plugins/groupware/personal/groupware/class_Groupware.inc +++ b/gosa-plugins/groupware/personal/groupware/class_Groupware.inc @@ -241,6 +241,9 @@ class Groupware extends plugin */ function execute() { + echo "execute
";
+		print_r($_POST);
+		echo "
"; // Register plugin execution $display = plugin::execute(); @@ -294,12 +297,6 @@ class Groupware extends plugin $this->dialog = TRUE; return($this->filterManager->execute()); } - /**************** - MailLimits - ****************/ - - - /**************** Folder editor @@ -532,6 +529,7 @@ class Groupware extends plugin */ function save_object() { + echo "save Object"; if(isset($_POST['groupwarePluginPosted'])){ // We ran into a communication error with the backend. @@ -851,7 +849,13 @@ class Groupware extends plugin //checks for feature "mailLimit" if($this->isFeatureEnabled("mailLimit") && $this->hasFeaturebeenChanged("mailLimit")){ - $this->groupwareDao->save("mailLimit", $this->uid, array("receive"=>$this->mailLimitReceiveValue, "send"=>$this->mailLimitSendValue,)); + if(!$this->mailLimitReceiveEnabled){ + $this->mailLimitReceiveValue = 0; + } + if(!$this->mailLimitSendEnabled){ + $this->mailLimitSendValue = 0; + } + $this->groupwareDao->save("mailLimit", $this->uid, array( "send"=>$this->mailLimitSendValue, "receive"=>$this->mailLimitReceiveValue)); } if($this->isFeatureEnabled("vacationMessage")&& $this->hasFeaturebeenChanged("vacationMessage")){ if($this->vacationEnabled){ @@ -1069,4 +1073,4 @@ class Groupware extends plugin } -?> \ No newline at end of file +?> diff --git a/gosa-plugins/groupware/personal/groupware/generic.tpl b/gosa-plugins/groupware/personal/groupware/generic.tpl index 150763d0f..fa074232b 100644 --- a/gosa-plugins/groupware/personal/groupware/generic.tpl +++ b/gosa-plugins/groupware/personal/groupware/generic.tpl @@ -206,13 +206,13 @@ {render acl=$mailBoxWarnLimitACL} - {/render} {render acl=$mailBoxWarnLimitACL} {t}MB{/t} + size="6" align="middle" type='text' value="{$mailBoxWarnLimitValue}" {if !$mailBoxWarnLimitEnabled} disabled {/if} class="center"> {t}MB{/t} {/render} @@ -221,13 +221,13 @@ {render acl=$mailBoxSendSizelimitACL} - {/render} {render acl=$mailBoxSendSizelimitACL} {t}MB{/t} + size="6" align="middle" type='text' value="{$mailBoxSendSizelimitValue}" {if !$mailBoxSendSizelimitEnabled} disabled {/if} class="center"> {t}MB{/t} {/render} @@ -236,13 +236,13 @@ {render acl=$mailBoxHardSizelimitACL} - {/render} {render acl=$mailBoxHardSizelimitACL} {t}MB{/t} + size="6" align="middle" type='text' value="{$mailBoxHardSizelimitValue}" {if !$mailBoxHardSizelimitEnabled} disabled {/if} class="center"> {t}MB{/t} {/render} @@ -251,13 +251,13 @@ {render acl=$mailBoxAutomaticRemovalACL} - {/render} {render acl=$mailBoxAutomaticRemovalACL} {t}days{/t} + size="6" align="middle" type='text' value="{$mailBoxAutomaticRemovalValue}" {if !$mailBoxAutomaticRemovalEnabled} disabled {/if} class="center"> {t}days{/t} {/render} @@ -265,20 +265,20 @@ {if $mailLimit_isActive} - {t}kbyte{/t} + size="6" align="middle" type='text' value="{$mailLimitReceiveValue}" {if !$mailLimitReceiveEnabled} disabled {/if} class="center"> {t}kbyte{/t} - {t}kbyte{/t} + size="6" align="middle" type='text' value="{$mailLimitSendValue}" {if !$mailLimitSendEnabled} disabled {/if} class="center"> {t}kbyte{/t} {/if} -- 2.30.2