Code

Added 'enable' flag to user filter.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Mar 2010 09:21:07 +0000 (09:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 10 Mar 2010 09:21:07 +0000 (09:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16366 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/ihtml/themes/modern/filterEditorEntry.tpl
gosa-core/include/class_filterEditorEntry.inc

index 54855f018f648ae5a562dda43c5d8e074790ea99..71f5e0fcc7c4889541544e27e0ad8c5a496d7015 100644 (file)
       <br>
       
       <input type='checkbox' name='shareFilter' value='1' {if $share} checked {/if}>
-       {t}Share this filter with others{/t}              
+       {t}Public visible{/t}              
+
+      <br>
+    
+      <input type='checkbox' name='enableFilter' value='1' {if $enable} checked {/if}>
+       {t}Enabled{/t}
+
     </td>
     <td style='vertical-align: top;'>
-      <label for='usedCategory'>{t}The categories this filter is displayed for{/t}</label><br>
+      <label for='usedCategory'>{t}Affects the following categories{/t}</label><br>
       <select id='usedCategory' name='usedCategory[]' size='4' multiple style='width:100%;'>
         {html_options options=$selectedCategories}
       </select>
index 76e0bcb249df248bc933c6a3e4f06ab06a3d3ceb..7d347558b5b2c62282e48238e0f6308b87168699 100644 (file)
@@ -10,6 +10,7 @@ class filterEditEntry extends plugin
   public $description = "";
   public $selectedCategories = array();
   public $share = FALSE;
+  public $enabled = TRUE;
   public $filter = "(objectClass=*)";
 
   // The list of all categories mangaged by the current filter object.
@@ -31,6 +32,7 @@ class filterEditEntry extends plugin
       $this->filter = $entry['filter'];
       $this->selectedCategories = $entry['categories'];
       $this->share = in_array("share",$entry['flags']);
+      $this->enable = in_array("enable",$entry['flags']);
     }
     $this->orig_name = $this->name;
   }
@@ -65,6 +67,7 @@ class filterEditEntry extends plugin
     $smarty->assign('name', $this->name);
     $smarty->assign('filter', $this->filter);
     $smarty->assign('share', $this->share);
+    $smarty->assign('enable', $this->enabled);
     $smarty->assign('description', $this->description);
     $smarty->assign('selectedCategories', $this->selectedCategories);
     $smarty->assign('availableCategories', $this->availableCategories);
@@ -87,6 +90,7 @@ class filterEditEntry extends plugin
 
       // Get posted flags 
       $this->share = isset($_POST['shareFilter']);
+      $this->enable = isset($_POST['enableFilter']);
 
       // Get additional category  
       if(isset($_POST['addCategory'])){
@@ -142,6 +146,9 @@ class filterEditEntry extends plugin
     if($this->share){
       $ret['flags'][] = "share";
     }
+    if($this->enable){
+      $ret['flags'][] = "enable";
+    }
     return($ret);
   }
 }