Code

Updated multiple edit for mailAccounts.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 07:52:10 +0000 (07:52 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 9 Dec 2008 07:52:10 +0000 (07:52 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13194 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/mail/personal/mail/class_mailAccount.inc
gosa-plugins/mail/personal/mail/generic.tpl

index 2a549a1f52ba1dae0f231cf20cefd70712d77ec4..b0d992cdda1bde5fbbca1749695ef0a8512080d4 100644 (file)
@@ -383,6 +383,8 @@ class mailAccount extends plugin
     $smarty->assign("allowSieveManagement", $this->mailMethod->allowSieveManagement());
     $smarty->assign("own_script",  $this->sieveManagementUsed);
 
+    print_a($this->multi_boxes);
+
     /* _Multiple users vars_ */
     foreach($this->attributes as $attr){
       $u_attr = "use_".$attr;
@@ -501,7 +503,7 @@ class mailAccount extends plugin
        */
       if (isset($_POST["import_vacation"]) && isset($this->vacationTemplates[$_POST["vacation_template"]])){
         if($this->multiple_support_active){
-          $contents = file_get_contents($_POST["vacation_template"]);
+          $contents = ltrim(preg_replace("/^DESC:.*$/m","",file_get_contents($_POST["vacation_template"])));
         }else{
           $contents = $this->prepare_vacation_template(file_get_contents($_POST["vacation_template"]));
         }
@@ -1163,6 +1165,15 @@ class mailAccount extends plugin
     }
     $ret['flag_add'] = $flag_add;
     $ret['flag_remove'] = $flag_remove;
+
+    echo "1";
+    if($this->mailMethod->vacationRangeEnabled()){
+      echo "2";
+      if(in_array("V",$flag_add)){
+        $ret['gosaVacationStart'] =  $this->gosaVacationStart = $_POST['gosaVacationStart'];
+        $ret['gosaVacationStop'] =  $this->gosaVacationStop = $_POST['gosaVacationStop'];
+      }
+    }
     return($ret);
   }
 
@@ -1247,8 +1258,8 @@ class mailAccount extends plugin
     }
   }
 
-  
-  /*! \brief  
+  /*! \brief
    */
   function get_multi_init_values()
   {
@@ -1257,7 +1268,7 @@ class mailAccount extends plugin
     return($attrs);
   }
 
-  
+
   /*! \brief  Display multiple edit dialog 
    */
   function multiple_execute()
index af073b5905e4afb892c7f1f72dfefefd47014abf..bb67e4cb5b043d9681440f78bd0c84268077f4ab 100644 (file)
@@ -4,6 +4,7 @@
 
    <h2><img class="center" alt="" align="middle" src="images/rightarrow.png" />&nbsp;{t}Generic{/t}</h2>
    <table summary="">
+{if !$multiple_support}
     <tr>
      <td><label for="mail">{t}Primary address{/t}</label>{$must}</td>
      <td>
@@ -32,6 +33,7 @@
 {/render}
      </td>
     </tr>
+{/if}
 
        <tr>
         <td>&nbsp;
@@ -45,7 +47,7 @@
        <tr>
         <td><label for="gosaMailQuota">{t}Quota size{/t}</label></td>
         <td>
-{render acl=$gosaMailQuotaACL}
+{render acl=$gosaMailQuotaACL checkbox=$multiple_support checked=$use_gosaMailQuota}
          <input id="gosaMailQuota" name="gosaMailQuota" size="6" align="middle" maxlength="60"
                value="{$gosaMailQuota}"> MB
                        {/render}
@@ -58,6 +60,7 @@
     &nbsp;
   </td>
   <td>
+{if !$multiple_support}
    <h2><img class="center" alt="" align="middle" src="plugins/mail/images/alternatemail.png" /><label for="alternates_list"> {t}Alternative addresses{/t}</    label></h2>
 {render acl=$gosaMailAlternateAddressACL}
    <select id="alternates_list" style="width:100%;height:100px;" name="alternates_list[]" size="15" multiple
@@ -76,6 +79,7 @@
 {render acl=$gosaMailAlternateAddressACL}
    <input type=submit value="{msgPool type=delButton}" name="delete_alternate">
 {/render}
+{/if}
   </td>
  </tr>
  <tr>