X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FCombobox.class.php;h=ce6673963aa4a7af1fea25c9dfa41f2f735b0180;hb=e1703495130c8ed88fe210f50a2a6b453b3c566b;hp=dcb84a24c1607c7808f1fe04e4ba7b5bdfc1a937;hpb=a07b6f8bccda226991ced6fe25f1c9c508e423e5;p=timetracker.git diff --git a/WEB-INF/lib/form/Combobox.class.php b/WEB-INF/lib/form/Combobox.class.php index dcb84a24..ce667396 100644 --- a/WEB-INF/lib/form/Combobox.class.php +++ b/WEB-INF/lib/form/Combobox.class.php @@ -44,12 +44,12 @@ class Combobox extends FormElement { var $mCompareOn = "key"; // or "value" var $mDataDeep = 1; var $mDataKeys = array(); - var $cClassName = "Combobox"; + var $class = 'Combobox'; function __construct($name,$value="") { - $this->mName = $name; - $this->mValue = $value; + $this->name = $name; + $this->value = $value; } function setMultiple($value) { $this->mMultiple = $value; } @@ -65,37 +65,33 @@ class Combobox extends FormElement { function getDataKeys() { return $this->mDataKeys; } - function toStringControl() { - if (!$this->isRenderable()) return ""; - - if ($this->mId=="") $this->mId = $this->mName; + function getHtml() { + + if ($this->id=="") $this->id = $this->name; $html = "\n\tmName\" id=\"$this->mId\""; + $html .= " name=\"$this->name\" id=\"$this->id\""; - if ($this->mSize!="") - $html .= " size=\"$this->mSize\""; + if ($this->size!="") + $html .= " size=\"$this->size\""; if ($this->mMultiple) $html .= " multiple"; - - if ($this->mTabindex!="") - $html .= " tabindex=\"$this->mTabindex\""; - - 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"; if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0)) foreach ($this->mOptionsEmpty as $key=>$value) { $html .= "\n"; } if (is_array($this->mOptions) && (count($this->mOptions) > 0)) @@ -106,7 +102,7 @@ class Combobox extends FormElement { $value = $value[$this->mDataKeys[1]]; } $html .= "\n"; }