From 168850b75e9a103c904a177fe904dcc28347a2b8 Mon Sep 17 00:00:00 2001 From: cajus Date: Fri, 7 Aug 2009 10:01:32 +0000 Subject: [PATCH] Updated filter to add autocomplete events git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13999 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_filter.inc | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/gosa-core/include/class_filter.inc b/gosa-core/include/class_filter.inc index 581621878..7b1867c79 100755 --- a/gosa-core/include/class_filter.inc +++ b/gosa-core/include/class_filter.inc @@ -113,19 +113,35 @@ class filter { function getTextfield($element) { - $result= ""; + $tag= (string)$element->tag; + $result= ""; + if (isset($element->autocomplete)) { + $frequency= "0.5"; + $characters= "1"; + if (isset($element->autocomplete->frequency)) { + $frequency= (string)$element->autocomplete->frequency; + } + if (isset($element->autocomplete->characters)) { + $characters= (string)$element->autocomplete->characters; + } + $result.= "
". + ""; + } return $result; } function getCheckbox($element) { + $tag= (string)$element->tag; $checked= ""; - if ($this->elementValues[$element] == "true") { + if ($this->elementValues[$tag] == "true") { $checked= " checked"; } - $result= ""; + $result= ""; return $result; } @@ -278,11 +294,11 @@ class filter { $htmlCode= ""; switch ($element->type) { case "textfield": - $htmlCode = $this->getTextfield($tag); + $htmlCode = $this->getTextfield($element); break; case "checkbox": - $htmlCode = $this->getCheckbox($tag); + $htmlCode = $this->getCheckbox($element); break; case "combobox": -- 2.30.2