From 48875bffa42145f273666a933ae4edde55304aea Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 4 Jul 2006 05:01:01 +0000 Subject: [PATCH] Fixed kolabInvitationPolicy Added grey out git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4020 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../connectivity/class_kolabAccount.inc | 35 ++++++++++++++----- plugins/personal/connectivity/kolab.tpl | 2 ++ 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc index abe802ab3..f0e1b62c1 100644 --- a/plugins/personal/connectivity/class_kolabAccount.inc +++ b/plugins/personal/connectivity/class_kolabAccount.inc @@ -32,9 +32,11 @@ class kolabAccount extends plugin /* Pull arrays */ foreach(array("kolabDelegate", "kolabInvitationPolicy") as $attr){ if (isset($this->attrs["$attr"]["count"])){ + $tmp = array(); for ($i= 0; $i<$this->attrs["$attr"]["count"]; $i++){ - array_push($this->$attr, $this->attrs["$attr"][$i]); + $tmp[]=$this->attrs["$attr"][$i]; } + $this->$attr = $tmp; } } @@ -94,9 +96,6 @@ class kolabAccount extends plugin /* Unify addresses */ $new= array(); foreach($this->kolabInvitationPolicy as $value){ - if (preg_match('/^:/', $value)){ - continue; - } $address= preg_replace('/^([^:]+:).*$/', '\1', $value); $new[$address]= $value; } @@ -184,8 +183,19 @@ class kolabAccount extends plugin $this->imapping= array(); $nr= 0; $acl= chkacl($this->acl, "kolabInvitationPolicy"); + $changeState = ""; foreach ($this->kolabInvitationPolicy as $entry){ + + $changeState .= "changeState('address".$nr."'); \n changeState('policy".$nr."'); \n + changeState('add".$nr."'); \n changeState('remove".$nr."'); \n"; + $invitation.= ""; + if($this->is_account){ + $dis = " "; + }else{ + $dis = " disabled "; + } + /* The default entry does not have colons... */ if (!preg_match('/:/', $entry)){ @@ -195,12 +205,12 @@ class kolabAccount extends plugin } else { $name= preg_replace('/:.*$/', '', $entry); $mode= preg_replace('/^[^:]*: */', '', $entry); - $invitation.= ""; + $invitation.= ""; } $invitation.= ""; /* Add mode switch */ - $invitation.= ""; foreach($policies as $key => $value){ if ($key == $mode){ $invitation.= ""; @@ -212,10 +222,10 @@ class kolabAccount extends plugin /* Assign buttons */ $button= ""; if ($nr == count($this->kolabInvitationPolicy)-1){ - $button= ""; + $button= ""; } if ($nr != 0) { - $button.= ""; + $button.= ""; } $invitation.= " $button\n"; @@ -223,7 +233,7 @@ class kolabAccount extends plugin $nr++; } $smarty->assign("invitation", $invitation); - + $smarty->assign("changeState", $changeState); $smarty->assign("kolabState",$this->is_account); $display.= $smarty->fetch (get_template_path('kolab.tpl', TRUE, dirname(__FILE__))); @@ -350,6 +360,13 @@ class kolabAccount extends plugin $this->attrs['kolabDelegate']= $this->kolabDelegate; $this->attrs['kolabInvitationPolicy']= $this->kolabInvitationPolicy; + /* unrestrictedMailSize is boolean */ + if($this->attrs['unrestrictedMailSize']){ + $this->attrs['unrestrictedMailSize'] = "TRUE"; + }else{ + $this->attrs['unrestrictedMailSize'] = "FALSE"; + } + /* Write back to ldap */ $ldap= $this->config->get_ldap_link(); $ldap->cd($this->dn); diff --git a/plugins/personal/connectivity/kolab.tpl b/plugins/personal/connectivity/kolab.tpl index 5a1522566..8810ca686 100644 --- a/plugins/personal/connectivity/kolab.tpl +++ b/plugins/personal/connectivity/kolab.tpl @@ -12,6 +12,8 @@ changeState('unrestrictedMailSize'); changeState('calFBURL'); changeState('kolabFreeBusyFuture'); + changeState('kolabInvitationPolicy'); + {$changeState} "> {t}Kolab account{/t}
-- 2.30.2