Code

Added checkboxes to filter
[gosa.git] / include / class_MultiSelectWindow.inc
index d50f410078326a1cf24ae246da14e87e1867c499..9dd83864c87abca7542ae2ccb0f2686a501b7a49 100644 (file)
@@ -360,6 +360,11 @@ class MultiSelectWindow{
           Store data also into a session var, to keep the checkboxes check after reload  */
        function save_object()
        {
+    /* Get up to date config */
+    if(isset($this->parent->config)){
+      $this->config = $this->parent->config;
+    }
+
                /* Update current base */
                if($this->DepartmentsAdded){
                        $s_action ="";
@@ -486,7 +491,7 @@ class MultiSelectWindow{
   /* Create header snapshot value */
   function get_snapshot_header()
   {
-    $str = "";
+    $str = " ";
     if($this->parent->snapshotEnabled()){
       $ok = false;
       foreach($this->parent->get_used_snapshot_bases() as $base){
@@ -508,16 +513,18 @@ class MultiSelectWindow{
 
   function GetSnapShotActions($dn)
   {
-    $str = "";
+    $str= "";
     if($this->parent->snapshotEnabled()){
 
-      $str= "<input class='center' type='image' src='images/snapshot.png'
-        alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($dn)."' title='"._("Create a new snapshot from this object")."'>&nbsp;";
-
       if(count($this->parent->Available_SnapsShots($dn))){
-        $str= "<input class='center' type='image' src='images/restore.png'
+        $str.= "<input class='center' type='image' src='images/restore.png'
           alt='"._("Restore snapshot")."' name='RestoreSnapShotDialog_".base64_encode($dn)."' title='"._("Restore snapshot")."'>&nbsp;";
+      } else {
+        $str = "<img class='center' src='images/restore_grey.png'>&nbsp;";
       }
+
+      $str.= "<input class='center' type='image' src='images/snapshot.png'
+        alt='"._("Create snapshot")."' name='CreateSnapShotDialog_".base64_encode($dn)."' title='"._("Create a new snapshot from this object")."'>&nbsp;";
     }
 
     return($str);