Code

Added iframe for tagging
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 May 2006 11:12:35 +0000 (11:12 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 May 2006 11:12:35 +0000 (11:12 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3292 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/departments/class_departmentManagement.inc

index 790f787c455cb32cc28c3da3320cf016eadf7144..a6104aecec0e7a619046426a2dcd381ab92a38d9 100644 (file)
@@ -322,18 +322,19 @@ class department extends plugin
 
                
     /* Optionally execute a command after we're done */
+    $this->must_be_tagged =true;
                $this->postcreate();
+    return(true);
+       }
 
-    $this->must_be_tagged =true;
+
+  function ShowTagFrame()
+  {
     $smarty = get_smarty();
-    $smarty->assign("src","?plug=".$_GET['plug']."&Tag");
-    $display=  $smarty->fetch(get_template_path("iframe.tpl",TRUE));
+    $smarty->assign("src","?plug=".$_GET['plug']."&TagDepartment");
+    $display=  $smarty->fetch(get_template_path("recursive_move.tpl",TRUE));
     return($display);
-    exit();
-
-       }
-
+  }
 
        /* Tag objects to have the gosaAdministrativeUnitTag */
        function tag_objects()
@@ -372,10 +373,16 @@ class department extends plugin
 
                        /* Fix entry if needed */
                        if ($fix){
-
+        echo "asdfasdfasdfasdf";
                                $this->handle_object_tagging($attrs['dn'], $this->gosaUnitTag);
                        }
                }
+                       echo '<p class="seperator">&nbsp;</p>';
+
+                       echo "<div style='width:100%;text-align:right;'><form name='form' method='post' action='?plug=".$_GET['plug']."' target='_parent'>
+                               <br><input type='submit' name='back' value='"._("Continue")."'>
+                               </form></div>";
+
        }
 
 
index f9bd648b851b3ecd3e232340ecac775f47a5b921..c454cc598c5fb3b9dee92bc018b33aa7d99dcbc1 100644 (file)
@@ -211,7 +211,7 @@ class departmentManagement extends plugin
 
                /* This department must be tagged 
          */
-               if((isset($_GET['Tag'])) && ($this->deptabs->by_object['department']->must_be_tagged())){
+               if((isset($_GET['TagDepartment'])) && ($this->deptabs->by_object['department']->must_be_tagged())){
                        $this->deptabs->by_object['department']->tag_objects();
                        if ($this->dn != "new"){
                                del_lock ($this->dn);
@@ -251,7 +251,12 @@ class departmentManagement extends plugin
 
                                /* Save user data to ldap */
                                $disp = $this->deptabs->save();
-                               if(!($this->deptabs->by_object['department']->am_i_moved() || ($this->deptabs->by_object['department']->must_be_tagged())) ){
+                               if($this->deptabs->by_object['department']->must_be_tagged()) {
+                                       $disp.= $this->deptabs->by_object['department']->ShowTagFrame();
+                                       return($disp);
+                               }       
+                                       
+                               if(!($this->deptabs->by_object['department']->am_i_moved()) ){
                                        gosa_log ("Department object'".$this->dn."' has been saved");
 
                                        /* Group has been saved successfully, remove lock from