summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 852df31)
raw | patch | inline | side by side (parent: 852df31)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Aug 2009 10:01:32 +0000 (10:01 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 7 Aug 2009 10:01:32 +0000 (10:01 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@13999 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history |
index 5816218782f1589c9fa1ffa8772b8b92e2d44a7c..7b1867c7926adde5ccc49082dd57c0017d871e43 100755 (executable)
function getTextfield($element)
{
- $result= "<input class='filter_textfield' name='$element' type='text' size='30' maxlength='30' value='".$this->elementValues[$element]."'>";
+ $tag= (string)$element->tag;
+ $result= "<input class='filter_textfield' id='$tag' name='$tag' type='text' size='30' maxlength='30' value='".$this->elementValues[$tag]."'>";
+ 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.= "<div id='autocomplete$tag' class='autocomplete'></div>".
+ "<script type='text/javascript'>".
+ "new Ajax.Autocompleter('$tag', 'autocomplete$tag', 'autocomplete.php', { minChars: $characters, frequency: $frequency });".
+ "</script>";
+ }
return $result;
}
function getCheckbox($element)
{
+ $tag= (string)$element->tag;
$checked= "";
- if ($this->elementValues[$element] == "true") {
+ if ($this->elementValues[$tag] == "true") {
$checked= " checked";
}
- $result= "<input class='filter_checkbox' name='$element' type='checkbox' onClick='document.mainform.submit();' value='true'$checked>";
+ $result= "<input class='filter_checkbox' name='$tag' type='checkbox' onClick='document.mainform.submit();' value='true'$checked>";
return $result;
}
$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":