X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FCombobox.class.php;h=88f0b50a933c3ebff149a0e257921bbf12a04573;hb=75a1eedb8977b8f2db459128bab9aaf367e3b58b;hp=a421b66a0e852c8edc6353d2042e5be6c4593fe9;hpb=e358c96cac5953f33fec0570e68f99f61802a436;p=timetracker.git diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index a421b66a..88f0b50a 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -44,13 +44,11 @@ class Combobox extends FormElement { var $mCompareOn = "key"; // or "value" var $mDataDeep = 1; var $mDataKeys = array(); - var $cClassName = "Combobox"; - function __construct($name,$value="") - { - $this->name = $name; - $this->value = $value; - } + function __construct($name) { + $this->class = 'Combobox'; + $this->name = $name; + } function setMultiple($value) { $this->mMultiple = $value; } function isMultiple() { return $this->mMultiple; } @@ -65,9 +63,8 @@ class Combobox extends FormElement { function getDataKeys() { return $this->mDataKeys; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - + function getHtml() { + if ($this->id=="") $this->id = $this->name; $html = "\n\tmMultiple) $html .= " multiple"; - if ($this->mOnChange!="") - $html .= " onchange=\"$this->mOnChange\""; + if ($this->on_change!="") + $html .= " onchange=\"$this->on_change\""; - if ($this->mStyle!="") - $html .= " style=\"$this->mStyle\""; + if ($this->style!="") + $html .= " style=\"$this->style\""; - if (!$this->isEnable()) + if (!$this->isEnabled()) $html .= " disabled"; $html .= ">\n"; @@ -112,4 +109,3 @@ class Combobox extends FormElement { return $html; } } -?> \ No newline at end of file