Code

Added user filter tags
[gosa.git] / include / class_MultiSelectWindow.inc
index 11c86d7c0a8ca29db5ed94aa01c49f2589076d71..7bea177b2cb02bf816c0d8a1d9c4f7701d3939a0 100644 (file)
@@ -33,6 +33,7 @@ class MultiSelectWindow{
        var $DepartmentsAdded           = false;
        var $selectedBase               = "";
 
+
        function ClearElementsList()
        {
                $this->array_Elements = array();
@@ -154,10 +155,12 @@ class MultiSelectWindow{
                        }else{
                                $arr['default'] = $default;
                        }
-                       $arr['name']    = $name;
-                       $arr['string']  = $string;
-                       $arr['value']   = $value;
-                       $arr['enabled'] = true;
+                       $arr['name']          = $name;
+                       $arr['string']      = $string;
+                       $arr['value']         = $value;
+                       $arr['enabled']     = true;
+
+      $this->$name = $default;
                }
                $this->array_Checkboxes[] = $arr;
        }
@@ -192,6 +195,15 @@ class MultiSelectWindow{
                $this->bool_DisplaySaveButton = $bool;
        }
 
+  /* Add a list specific filter object to position 
+      1 on top of Information 
+      2 Between Information && Filter
+      3 Below the Filter Part */
+  function AddUserBoxToFilter($position)
+  {
+    return("");
+  }
+
        /* Draw the list with all list elements and filters */
        function Draw()
        {
@@ -202,6 +214,9 @@ class MultiSelectWindow{
                }
 
                $smarty = get_smarty();
+               $smarty->assign("UserBox1",$this->AddUserBoxToFilter(1));
+               $smarty->assign("UserBox2",$this->AddUserBoxToFilter(2));
+               $smarty->assign("UserBox3",$this->AddUserBoxToFilter(3));
 
                $divlist = new divlist($this->string_Title);
                $divlist->SetSummary($this->string_Summary);
@@ -359,7 +374,7 @@ class MultiSelectWindow{
 
 
                        /* If Back-button is pressed, move back one step in DN */
-                       if($s_action == "back"){
+                       if($s_action=="back"){
                                //FIXME: This is not 100% correct. We'll only display ou's, but there may be
                                //       a step between. You'll stumble in a "hidden" department in this case.
                                $base_back= preg_replace("/^[^,]+,/", "", $_SESSION['CurrentMainBase']);
@@ -370,12 +385,14 @@ class MultiSelectWindow{
 
                                /* Check if the department exists, otherwise revert to the configure base DN */
                                if(isset($this->config->departments[$base_back])){
-                                       $_SESSION['CurrentMainBase']= $this->config->departments[$base_back];
+                                       $this->selectedBase= $this->config->departments[$base_back];
                                }else{
-                                       $_SESSION['CurrentMainBase']= $this->config->departments['/'];
+                                       $this->selectedBase= $this->config->departments['/'];
                                }
                        }
+      $_SESSION['CurrentMainBase'] = $this->selectedBase;
                }
+
                if(isset($_POST['MultiSelectWindow'.$this->filterName])){
 
                        /* Check posts from checkboxes 
@@ -503,5 +520,5 @@ class MultiSelectWindow{
                }
        }
 }
-
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>