Code

Added Mr. Röh Patch.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 May 2009 13:48:48 +0000 (13:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 May 2009 13:48:48 +0000 (13:48 +0000)
Allows to select the primary Group in Copy&PAste

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13605 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/personal/posix/class_posixAccount.inc
gosa-core/plugins/personal/posix/paste_generic.tpl

index 0b5bd88356d42af84a77c79957cbedbb70a14363..c26f27af6b509d331f46e3266ad6bc46cb5db995 100644 (file)
@@ -1457,6 +1457,11 @@ class posixAccount extends plugin
         $this->is_modified= TRUE;
       }
       $this->force_ids= $data;
+      $data= $_POST['primaryGroup'];
+      if ($this->primaryGroup != $data){
+        $this->is_modified= TRUE;
+      }
+      $this->primaryGroup= $_POST['primaryGroup'];
     }
   }
  
@@ -1510,6 +1515,9 @@ class posixAccount extends plugin
     /* Assigned informations to smarty */
     $smarty = get_smarty();
     $smarty->assign("homeDirectory",$this->homeDirectory);
+    $smarty->assign("secondaryGroups",$this->secondaryGroups);
+    $smarty->assign("primaryGroup",$this->primaryGroup);
     $smarty->assign("uidNumber",$this->uidNumber);
     $smarty->assign("gidNumber",$this->gidNumber);
     $smarty->assign("forceMode",$forceMode);
@@ -1545,6 +1553,12 @@ class posixAccount extends plugin
     $this->savedUidNumber = "";
 #    $this->savedGidNumber = $this->get_next_id("gidNumber", $this->dn);
     $this->savedGidNumber = "";
+
+    /* Fill group */
+    if(isset($source['gidNumber'][0])){
+      $this->primaryGroup= $source['gidNumber'][0];
+    }
+
   }
 
 
index 4b1461ddb7d0193cb745cfeef506c253ea1eef33..983c93c2f7fcd611fcad4ab6731f9241e33b2c6f 100644 (file)
                                </tr>
                        </table>
                        <table style='width:100%;'>
+        <tr>
+         <td><label for="primaryGroup">{t}Primary group{/t}</label></td>
+         <td>
+          <select id="primaryGroup" size="1" name="primaryGroup">
+           {html_options options=$secondaryGroups selected=$primaryGroup}
+          </select> 
+         </td>
+        </tr>
                                <tr>
                                        <td>
                                                <input id="force_ids" type=checkbox name="force_ids" value="1"  {$force_ids}