Code

improved copy & paste
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 17 Mar 2006 07:47:50 +0000 (07:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 17 Mar 2006 07:47:50 +0000 (07:47 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2856 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index d009a6f1e49e965a11491ddb5c3b0821c9013e6b..63fc8f760fc873679f2b04b95926c2208a71ec6c 100644 (file)
@@ -821,9 +821,9 @@ class group extends plugin
       $dis  = " disabled ";
     }
 
-    $str =" <table>
+    $str =" <table width='100%'>
               <tr>
-                <td>".
+                <td style='width:150px;'>".
                   _("Group name").
                 "</td>
                 <td>
@@ -833,19 +833,19 @@ class group extends plugin
                 </td>
               </tr>
               <tr>
-                <td colspan=2>
+                <td>
                   <input type=checkbox name='force_gid' value='1' ".$used."   
                       title='"._("Normally IDs are autogenerated, select to specify manually")."' 
                         onclick='changeState(\"gidNumber\")'
                   <LABEL for='gidNumber'>"._("Force GID")."</LABEL>
                 &nbsp;
+                </td>
+                <td>
                 <input name='gidNumber' size=5 maxlength=5 id='gidNumber' ".$dis."  
                     value='".$this->gidNumber."' title='"._("Forced ID number")."'>
                </td>
               </tr>
-
           </table>";
-
     return($str);
   }
 
@@ -855,10 +855,10 @@ class group extends plugin
       $this->cn = $_POST['cn'];
     }
     if(isset($_POST['force_gid'])){
-      $this->force_gid  = true;
+      $this->force_gid  = 1;
       $this->gidNumber= $_POST['gidNumber'];
     }else{
-      $this->force_gid  = false;
+      $this->force_gid  = 0;
       $this->gidNumber  = false;
     }
   }
index 64bf1be725f9d49135174cb0d1053a0a720f93e1..6f02f079450a54005739177cdd452cb6bb620b67 100644 (file)
@@ -47,7 +47,7 @@ class mailgroup extends plugin
   var $indexed_user= array();
 
   /* attribute list for save action */
-  var $attributes= array(   "mail",   "gosaMailServer", "gosaMailQuota", "gosaMailMaxSize",
+  var $attributes= array( "mail",   "gosaMailServer", "gosaMailQuota", "gosaMailMaxSize",
       "gosaMailAlternateAddress", "gosaMailForwardingAddress",
       "gosaMailDeliveryMode", "gosaSpamSortLevel", "gosaSpamMailbox",
       "acl","gosaSharedFolderTarget", "gosaVacationMessage");
@@ -808,7 +808,7 @@ I: Only insider delivery */
     if ($ldap->count() != 0){
       $message[]= _("The primary address you've entered is already in use.");
     }
-
+  
     /* Check quota */
     if ($this->gosaMailQuota != '' && chkacl ($this->acl, "gosaMailQuota") == ""){
       if (!is_numeric($this->gosaMailQuota)) {
@@ -946,9 +946,9 @@ I: Only insider delivery */
   {
     if(!$this->is_account) return("");
 
-    $str =" <table>
+    $str =" <table width='100%'>
               <tr>
-                <td>".
+                <td style='width:150px;'>".
                   _("Primary mail address").
                 "</td>
                 <td>
@@ -958,7 +958,6 @@ I: Only insider delivery */
                 </td>
               </tr>
             </table>";
-
     return($str);
   }
 
index 9205244d5c80af7909f92b587851d65dbe62cb9b..53031e89b3162f71e42a6081c321a39c774aa2db 100644 (file)
@@ -62,6 +62,22 @@ class grouptabs extends tabs
                return tabs::save();
        }
 
+       function saveCopyDialog()
+       {
+               tabs::saveCopyDialog();
+               
+        /* Update reference, transfer variables */
+        $baseobject= $this->by_object['group'];
+        foreach ($this->by_object as $name => $obj){
+            /* Don't touch base object */
+            if ($name != 'group'){
+                $obj->parent= &$this;
+                $obj->cn= $baseobject->cn;
+                $this->by_object[$name]= $obj;
+            }
+        }
+       }
+       
 }
 
 ?>