summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ab9af43)
raw | patch | inline | side by side (parent: ab9af43)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 May 2005 15:16:06 +0000 (15:16 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 12 May 2005 15:16:06 +0000 (15:16 +0000) |
TODO | patch | blob | history | |
plugins/personal/connectivity/class_kolabAccount.inc | patch | blob | history | |
plugins/personal/connectivity/kolab.tpl | patch | blob | history |
index ff35559ba06e85ed0fd8b12922d220d6c010663a..2f10b65fcdedd25d3d9642e4114df11230f6a8f7 100644 (file)
--- a/TODO
+++ b/TODO
- shared folders
- server
- setup
+ * check is present
+ * modify connectivity tab!
* Make it "barrierefrei"
diff --git a/plugins/personal/connectivity/class_kolabAccount.inc b/plugins/personal/connectivity/class_kolabAccount.inc
index aadc9cd34e4b42f90e2865f3ba1a80b5d251f713..0bff3f32651195801d26ac64e8db004ce7195bb9 100644 (file)
var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
/* Kolab attributes */
- var $kolabInvitationPolicy= "ACT_MANUAL";
+ var $kolabInvitationPolicy= array();
var $kolabFreeBusyFuture= 60;
var $unrestrictedMailSize= 0;
var $calFBURL= "";
var $kolabDelegate= array();
/* attribute list for save action */
- var $attributes= array( "kolabInvitationPolicy", "kolabFreeBusyFuture",
- "unrestrictedMailSize", "calFBURL");
+ var $attributes= array( "kolabFreeBusyFuture", "unrestrictedMailSize", "calFBURL");
var $objectclasses= array();
function kolabAccount ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
- /* Pull delegation array */
- if (isset($this->attrs["kolabDelegate"]["count"])){
- for ($i= 0; $i<$this->attrs["kolabDelegate"]["count"]; $i++){
- array_push($this->kolabDelegate, $this->attrs["kolabDelegate"][$i]);
+ /* Pull arrays */
+ foreach(array("kolabDelegate", "kolabInvitationPolicy") as $attr){
+ if (isset($this->attrs["$attr"]["count"])){
+ for ($i= 0; $i<$this->attrs["$attr"]["count"]; $i++){
+ array_push($this->$attr, $this->attrs["$attr"][$i]);
+ }
}
}
+ /* If this one is empty, preset with ACT_MANUAL for anonymous users */
+ if (count ($this->kolabInvitationPolicy) == 0){
+ $this->kolabInvitationPolicy= array("ACT_MANUAL");
+ }
+
}
function execute()
/* Transfer delegation list */
$smarty->assign("kolabDelegate", $this->kolabDelegate);
+ /* Create InvitationPolicy table */
+ $invitation= "";
+ $nr= 0;
+ $acl= chkacl($this->acl, "kolabInvitationPolicy");
+ foreach ($this->kolabInvitationPolicy as $entry){
+ $invitation.= "<tr><td>";
+
+ /* The default entry does not have colons... */
+ if (!preg_match('/:/', $entry)){
+ $invitation.= _("Anonymous");
+ $mode= $entry;
+ } else {
+ $name= preg_replace('/:.*$/', '', $entry);
+ $mode= preg_replace('/^[^:]+: */', '', $entry);
+ $invitation.= "<input name=\"address$nr\" size=25 maxlength=60 $acl value=\"$name\">";
+ }
+ $invitation.= "</td>";
+
+ /* Add mode switch */
+ $invitation.= "<td><select size=\"1\" name=\"policy$nr\" $acl>";
+ foreach($policies as $key => $value){
+ if ($key == $mode){
+ $invitation.= "<option value=\"$key\" selected>$value</option>";
+ } else {
+ $invitation.= "<option value=\"$key\">$value</option>";
+ }
+ }
+
+ /* Assign buttons */
+ $button= "";
+ if ($nr == count($this->kolabInvitationPolicy)-1){
+ $button= "[Add button]";
+ } elseif ($nr != 0) {
+ $button= "[Remove button]";
+ }
+
+ $invitation.= "</select> $button</td></tr>\n";
+ $nr++;
+ }
+ $smarty->assign("invitation", $invitation);
+
$display.= $smarty->fetch (get_template_path('kolab.tpl', TRUE, dirname(__FILE__)));
return ($display);
}
}
plugin::save_object();
+
+ /* Save changes done in invitation policies */
+ $nr= 0;
+ $this->kolabInvitationPolicy= array();
+ while (isset($_POST["policy$nr"])){
+
+ /* Anonymous? */
+ if (!isset($_POST["address$nr"])){
+ $this->kolabInvitationPolicy[]= $_POST["policy$nr"];
+ } else {
+ $this->kolabInvitationPolicy[]= $_POST["address$nr"].": ".$_POST["policy$nr"];
+ }
+
+ $nr++;
+ }
+
}
index d0a02bc3ee8fbc192a456d7b836dc17cc1d5e983..92e2eb7d4e28c0f5b54a7991063049263f4e0a7e 100644 (file)
{$kolabDelegateACL}>
<input type=submit value="{t}Delete{/t}" name="delete_delegation"
{$kolabDelegateACL}>
+ <p>
+ <b>{t}Mail size{/t}</b><br>
+ <input type="checkbox" name="unrestrictedMailSize" value="1" {$unrestrictedMailSizeACL} {$unrestrictedMailSizeState}> {t}No mail size restriction for this account{/t}
+ </p>
</td>
<td rowspan=2 style="border-left:1px solid #A0A0A0">
</td>
<td style="vertical-align:top;">
-<p>
- <b>{t}Invitation{/t}</b><br>
- {t}Policy{/t}
- <select size="1" name="kolabInvitationPolicy" {$kolabInvitationPolicyACL}>
- {html_options options=$policies selected=$kolabInvitationPolicy}
- </select>
-</p>
<p>
<b>{t}Free Busy information{/t}</b><br>
<table>
</table>
</p>
<p>
- <b>{t}Misc{/t}</b><br>
- <input type="checkbox" name="unrestrictedMailSize" value="1" {$unrestrictedMailSizeACL} {$unrestrictedMailSizeState}> {t}No mail size restriction{/t}
+ <b>{t}Invitation policy{/t}</b><br>
+ <table>
+ {$invitation}
+ </table>
</p>
</td>
</tr>