summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 043f91b)
raw | patch | inline | side by side (parent: 043f91b)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Aug 2009 13:49:23 +0000 (13:49 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 20 Aug 2009 13:49:23 +0000 (13:49 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14095 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_filter.inc | patch | blob | history |
index 1247ad781b62997165444711a8d4efc2d4368145..0bea6c4a69439e0d332efb044255762bf63b26fa 100644 (file)
$this->alphabetElements[]= $tag;
}
}
+
+ // Sort elements for element length to allow proper replacing later on
+ function strlenSort($a, $b) {
+ if (strlen($a['tag']) == strlen($b['tag'])) {
+ return 0;
+ }
+ return (strlen($a['tag']) < strlen($b['tag']) ? -1 : 1);
+ }
+ uasort($this->elements, 'strlenSort');
+ $this->elements= array_reverse($this->elements);
+
}
return true;
function getTextfield($element)
{
$tag= $element['tag'];
- $result= "<input class='filter_textfield' id='$tag' name='$tag' type='text' size='30' maxlength='30' value='".$this->elementValues[$tag]."'>";
+ $size= 30;
+ if (isset($element['size'])){
+ $size= $element['size'];
+ }
+ $maxlength= 30;
+ if (isset($element['maxlength'])){
+ $maxlength= $element['maxlength'];
+ }
+ $result= "<input class='filter_textfield' id='$tag' name='$tag' type='text' size='$size' maxlength='maxlength' value='".$this->elementValues[$tag]."'>";
if (isset($element['autocomplete'])) {
$frequency= "0.5";
$characters= "1";