Code

Updated Base selection
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 27 Feb 2006 13:27:49 +0000 (13:27 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 27 Feb 2006 13:27:49 +0000 (13:27 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2749 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/generic/class_user.inc
plugins/personal/generic/generic.tpl

index 7d6c7c51ec59a5b0c7a9750801a7d058f025108d..1d3e4d4d150153fcc19853a56dd3de96c492ee55 100644 (file)
@@ -272,9 +272,13 @@ class user extends plugin
     }
 
     /* Base select dialog */
-    if(isset($_POST['chooseBase'])){
-      $this->dialog = new baseSelectDialog($this->config,$this->allowedBasesToMoveTo());
-      $this->dialog->setCurrentBase($this->base);
+    $once = true;
+    foreach($_POST as $name => $value){
+      if(preg_match("/^chooseBase/",$name) && $once){
+        $once = false;
+        $this->dialog = new baseSelectDialog($this->config,$this->allowedBasesToMoveTo());
+        $this->dialog->setCurrentBase($this->base);
+      }
     }
 
     /* Dialog handling */
@@ -465,7 +469,7 @@ class user extends plugin
     /* Show us the edit screen */
     @$smarty->assign("bases", $this->allowedBasesToMoveTo());
 #  $smarty->assign("bases", $this->config->idepartments);
-    $smarty->assign("base_select",      trim($this->config->idepartments[$this->base]));
+    $smarty->assign("base_select",      $this->base);
     $smarty->assign("selectmode",       chkacl($this->acl, "create"));
     $smarty->assign("certificatesACL",  chkacl($this->acl, "certificates"));
     $smarty->assign("jpegPhotoACL",     chkacl($this->acl, "jpegPhoto"));
index d8bbab58fe9c6ebccce1547090c7fe0f53861303..1af32ea6bee13db30c09cc3faeec9b1cd3551436 100644 (file)
      </td>
      <td>
       <div style="height:10px;"></div>
-               <!--
       <select id="base" size="1" name="base" {$selectmode} title="{t}Choose subtree to place user in{/t}">
        {html_options options=$bases selected=$base_select}
       </select>
-               -->
-          {$base_select}
-          <input type="submit" name="chooseBase" value="{t}Edit{/t}">
+          <input type="image" name="chooseBase" src="images/folder.png">
      </td>
     </tr>
    </table>