Code

Updated ACL Handling
[gosa.git] / gosa-core / include / class_filter.inc
index 64cfded3d8a600559b97bcd076b296cd3ed418fa..9b2fed5458381bcf79bba4e76752ac552e2b6042 100644 (file)
@@ -183,7 +183,7 @@ class filter {
 
   function getCombobox($element)
   {
-    $result= "<select name='".$element['tag']."' size='1' onClick='document.mainform.submit();'>";
+    $result= "<select name='".$element['tag']."' size='1' onChange='document.mainform.submit();'>";
 
     // Fill with presets
     foreach ($element['value'] as $value) {
@@ -214,6 +214,18 @@ class filter {
   }
 
 
+  function setComboBoxOptions($tag, $options)
+  {
+    if (isset($this->elements[$tag]) && $this->elements[$tag]['type'] == "combobox") {
+      
+      $this->elements[$tag]['value']= array();
+      foreach ($options as $key => $label) {
+        $this->elements[$tag]['value'][]= array('label' => $label, 'key' => $key);
+      }
+    }
+  }
+
+
   function getCurrentBase()
   {
     if (isset($this->search->base) && (string)$this->search->scope != "auto") {