Code

Updated mailAccount to allow to modify the mail address for templates
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Mar 2011 09:15:47 +0000 (09:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Mar 2011 09:15:47 +0000 (09:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20625 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index bbb0021dd347037113b74ca85a647b25a7bdd433..333b44217e1625fa04063b4f245b64e683271361 100644 (file)
@@ -154,7 +154,7 @@ class mailAccount extends plugin
 
     /* Initialize configured values 
      */ 
-    if($this->is_account){
+    if($this->is_account && !$this->is_template){
 
       if($this->mailMethod->connect() && $this->mailMethod->account_exists()){
 
@@ -497,7 +497,7 @@ class mailAccount extends plugin
      */
     $smarty->assign("spamlevel", $this->SpamLevels);
     $smarty->assign("spambox"  , $this->MailBoxes);
-
+    $smarty->assign("is_template", $this->is_template);
     $smarty->assign("multiple_support",$this->multiple_support_active);  
     return($display.$smarty->fetch(get_template_path("generic.tpl",TRUE,dirname(__FILE__))));
   }
@@ -514,11 +514,11 @@ class mailAccount extends plugin
       $server = $this->gosaMailServer;
       plugin::save_object();
 
-      if(!$this->mailMethod->isModifyableServer() && $this->initially_was_account){
+      if(!$this->mailMethod->isModifyableServer() && $this->initially_was_account && !$this->is_template){
         $this->gosaMailServer = $server;
       }
 
-      if(!$this->mailMethod->isModifyableMail() && $this->initially_was_account){
+      if(!$this->mailMethod->isModifyableMail() && $this->initially_was_account && !$this->is_template){
         $this->mail = $mail;
       }else{
 
index 82724c1f1391757e1f4b226e3f4dc2e207cbf912..423a9aae53e3c03f42e0dbae35bc1e7a05711360 100644 (file)
@@ -9,7 +9,7 @@
     <tr>
      <td><label for="mail">{t}Primary address{/t}</label>{$must}</td>
      <td>
-      {if !$isModifyableMail && $initially_was_account}
+      {if !$isModifyableMail && $initially_was_account && !$is_template}
       <input type='text' disabled size=30 value="{$mail}">
       {else}
       {if $domainSelectionEnabled}
@@ -30,7 +30,7 @@
     <tr>
      <td><label for="gosaMailServer">{t}Server{/t}</label></td>
      <td>
-      {if !$isModifyableServer && $initially_was_account}
+      {if !$isModifyableServer && $initially_was_account && !$is_template}
       <input type='text' disabled size=30 value="{$gosaMailServer}">
       {else}