Code

Added baseselect icon to groups
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Feb 2006 05:20:37 +0000 (05:20 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Feb 2006 05:20:37 +0000 (05:20 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2750 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/class_groupGeneric.inc
plugins/admin/groups/generic.tpl

index 143830bc25ebad56c2872e9ecd1d94ecb0fde2f0..e1286d7e1b1344263e9783e717d637d24904a748 100644 (file)
@@ -34,7 +34,7 @@ class group extends plugin
   var $group_dialog= FALSE;
   var $nagios_group =FALSE;
   var $sambaGroupType;
-
+  var $dialog;
 
   /* attribute list for save action */
   var $attributes= array("cn", "description", "gidNumber","memberUid","sambaGroupType","sambaSID");
@@ -201,7 +201,32 @@ class group extends plugin
       $this->reload();
     }
 
-    /* Assign templating stuff */
+    /* Base select dialog */
+    $once = true;
+    foreach($_POST as $name => $value){
+      if(preg_match("/^chooseBase/",$name) && $once){
+        $once = false;
+        $this->dialog = new baseSelectDialog($this->config);
+        $this->dialog->setCurrentBase($this->base);
+      }
+    }
+
+    /* Dialog handling */
+    if(is_object($this->dialog)){
+      /* Must be called before save_object */
+      $this->dialog->save_object();
+
+      if($this->dialog->isClosed()){
+        $this->dialog = false;
+      }elseif($this->dialog->isSelected()){
+        $this->base = $this->dialog->isSelected();
+        $this->dialog= false;
+      }else{
+        return($this->dialog->execute());
+      }
+    }
+
+   /* Assign templating stuff */
     $smarty= get_smarty();
     if ($this->samba3){
       $smarty->assign("samba3", "true");
index eb8646cfff3d0a814d71666b855c89d198b20120..2871c0b4ecdd2a79fc6ab875cbea18fd0a155ab1 100644 (file)
@@ -23,6 +23,7 @@
       <select id="base" size="1" name="base" {$baseACL} title="{t}Choose subtree to place group in{/t}">
        {html_options options=$bases selected=$base_select}
       </select>
+      <input type="image" name="chooseBase" src="images/folder.png" class="center">
      </td>
     </tr>
     <tr>