Code

Added base select icon
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Feb 2006 05:22:27 +0000 (05:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 28 Feb 2006 05:22:27 +0000 (05:22 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2751 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/departments/generic.tpl

index 62ceff1262dc8e1e1850980263c897e35acd512c..3146f8a4c3261c5189fe1132a499ef4fc7e2fa64 100644 (file)
@@ -78,6 +78,32 @@ class department extends plugin
          $this->config->make_idepartments();
          $smarty= get_smarty();
 
+
+         /* 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());
+                 }
+         }
+
          /* Hide all departments, that are subtrees of this department */
          $bases        = $this->config->idepartments;
          if(($this->dn == "new")||($this->dn == "")){
index aeb92d87c2bbf2a523579139898e910e90dec451..a8538d394cbf33523888a56f79480047781646da 100644 (file)
@@ -30,6 +30,7 @@
          <select id="base" size="1" name="base" title="{t}Choose subtree to place department in{/t}"> 
           {html_options options=$bases selected=$base_select}
          </select>
+               <input type="image" name="chooseBase" src="images/folder.png" class="center">
        </td>
        </tr>
      </table>