Further refactoring of the FormElement class.
[timetracker.git] / WEB-INF / lib / form / Combobox.class.php
index a421b66..314f4b7 100644 (file)
@@ -44,7 +44,7 @@ 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="")
        {
@@ -65,9 +65,8 @@ class Combobox extends FormElement {
        function getDataKeys() { return $this->mDataKeys; }
        
        
-       function toStringControl()      {
-               if (!$this->isRenderable()) return "";
-           
+       function toStringControl() {
+
            if ($this->id=="") $this->id = $this->name;
            
                $html = "\n\t<select";
@@ -79,13 +78,13 @@ class Combobox extends FormElement {
                if ($this->mMultiple)
                  $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";