summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4bc771d)
raw | patch | inline | side by side (parent: 4bc771d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Jul 2006 05:01:01 +0000 (05:01 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 4 Jul 2006 05:01:01 +0000 (05:01 +0000) |
Added grey out
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4020 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4020 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/connectivity/class_kolabAccount.inc | patch | blob | history | |
plugins/personal/connectivity/kolab.tpl | patch | blob | history |
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index abe802ab30f088ce2bdadc869d157f38d85db3a7..f0e1b62c16e12150f0be55e0dcff085e151d02ff 100644 (file)
/* 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;
}
}
/* Unify addresses */
$new= array();
foreach($this->kolabInvitationPolicy as $value){
- if (preg_match('/^:/', $value)){
- continue;
- }
$address= preg_replace('/^([^:]+:).*$/', '\1', $value);
$new[$address]= $value;
}
$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.= "<tr><td>";
+ if($this->is_account){
+ $dis = " ";
+ }else{
+ $dis = " disabled ";
+ }
+
/* The default entry does not have colons... */
if (!preg_match('/:/', $entry)){
} else {
$name= preg_replace('/:.*$/', '', $entry);
$mode= preg_replace('/^[^:]*: */', '', $entry);
- $invitation.= "<input name=\"address$nr\" size=16 maxlength=60 $acl value=\"$name\">";
+ $invitation.= "<input name=\"address$nr\" size=16 maxlength=60 $acl value=\"$name\" id='address".$nr."' ".$dis.">";
}
$invitation.= "</td>";
/* Add mode switch */
- $invitation.= "<td><select size=\"1\" name=\"policy$nr\" $acl>";
+ $invitation.= "<td><select size=\"1\" name=\"policy$nr\" $acl id='policy".$nr."' ".$dis.">";
foreach($policies as $key => $value){
if ($key == $mode){
$invitation.= "<option value=\"$key\" selected>$value</option>";
/* Assign buttons */
$button= "";
if ($nr == count($this->kolabInvitationPolicy)-1){
- $button= "<input type=submit name=\"add$nr\" value=\""._("Add")."\">";
+ $button= "<input type=submit name=\"add$nr\" value=\""._("Add")."\" id='add".$nr."' ".$dis.">";
}
if ($nr != 0) {
- $button.= "<input type=submit name=\"remove$nr\" value=\""._("Remove")."\">";
+ $button.= "<input type=submit name=\"remove$nr\" value=\""._("Remove")."\" id='remove".$nr."' ".$dis.">";
}
$invitation.= "</select> $button</td></tr>\n";
$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__)));
$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);
index 5a1522566cb158fb1e7be363b94b00b6056b0b94..8810ca6867fb7785c65ccf42cdec6b3628d32dd6 100644 (file)
changeState('unrestrictedMailSize');
changeState('calFBURL');
changeState('kolabFreeBusyFuture');
+ changeState('kolabInvitationPolicy');
+ {$changeState}
">
<b>{t}Kolab account{/t}</b>
<br>