Code

Fixed group copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 21 Mar 2006 07:38:04 +0000 (07:38 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 21 Mar 2006 07:38:04 +0000 (07:38 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2870 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc
plugins/admin/groups/class_groupMail.inc
plugins/admin/groups/class_groupManagement.inc

index 63fc8f760fc873679f2b04b95926c2208a71ec6c..9659a70428a1df53676cdd80b938733fb7664736 100644 (file)
@@ -821,7 +821,8 @@ class group extends plugin
       $dis  = " disabled ";
     }
 
-    $str =" <table width='100%'>
+    $str =" <h2>"._("Group settings")."</h2>
+            <table width='100%'>
               <tr>
                 <td style='width:150px;'>".
                   _("Group name").
index 0076c7317b3e050a52a20272161c49657b3741de..533347ddaf66b0cdf6caa000702d85475da0ed65 100644 (file)
@@ -789,6 +789,9 @@ I: Only insider delivery */
     $ldap= $this->config->get_ldap_link();
 
     $message= array();
+    if(!$this->is_account) return array();
+    
+    //$message[] = $str;      
 
     /* must: mail */
     if ($this->mail == ""){
@@ -941,24 +944,21 @@ I: Only insider delivery */
   {
     if(!$this->is_account) return("");
 
-    $str =" <table width='100%'>
-              <tr>
-                <td style='width:150px;'>".
-                  _("Primary mail address").
-                "</td>
-                <td>
-                   <input id='mail' name='mail' size='16' maxlength='160'
-                    value='".$this->mail."'
-                    title='"._("Primary mail address for this shared folder")."'>
-                </td>
-              </tr>
-            </table>";
-    return($str);
+    $smarty = get_smarty();
+    $smarty->assign("gosaMailAlternateAddress",$this->gosaMailAlternateAddress);
+    $smarty->assign("gosaMailForwardingAddress",$this->gosaMailForwardingAddress);
+    $smarty->assign("mail",$this->mail);
+    $display= $smarty->fetch (get_template_path('paste_mail.tpl', TRUE));
+    return($display);
   }
 
   function saveCopyDialog()
   {
     if(!$this->is_account) return;
+
+    /* Perform ADD / REMOVE ... for mail alternate / mail forwarding addresses 
+    */
+    $this->execute();
     if(isset($_POST['mail'])){
       $this->mail = $_POST['mail'];
     }
index 0636d6c4460fff0caad0c82bb1b6409caae6506c..a3d90a0df86ff587f7c4dc2c255fd20487179cfb 100644 (file)
@@ -219,8 +219,17 @@ class groupManagement extends plugin
         $objNew = new grouptabs($this->config,$this->config->data['TABS']['GROUPTABS'], "new");
         $obj->set_acl($acl);
         $objNew->set_acl($acl);
-        
         $this->CopyPasteHandler->Copy($obj,$objNew);
+  
+        foreach($this->CopyPasteHandler->current->by_object as $name => $obj){
+          foreach(array('is_account','gotoHotplugDevices','gotoLogonScripts',
+                'gotoProfileServers','gotoProfileFlag_C','gotoProfileFlag_L',
+                'gotoPrinter','useProfile','OrigCn','Categories') as $attr){
+            if(isset($obj->$attr)){
+              $this->CopyPasteHandler->current->by_object[$name]->$attr = $obj->$attr;
+            }
+          }
+        }
       }