]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/form/Combobox.class.php
Ongoing refactoring of form controls.
[timetracker.git] / WEB-INF / lib / form / Combobox.class.php
index 31b89bed7b92e6cee572497284bee084158cfb4a..0e8ec06c780b039731f862ce830615c99e829447 100644 (file)
@@ -46,9 +46,9 @@ class Combobox extends FormElement {
     var $mDataKeys = array();
     var $cClassName    = "Combobox";
 
-       function Combobox($name,$value="")
+       function __construct($name,$value="")
        {
-               $this->mName                    = $name;
+               $this->name                     = $name;
                $this->mValue                   = $value;
        }
 
@@ -68,10 +68,10 @@ class Combobox extends FormElement {
        function toStringControl()      {
                if (!$this->isRenderable()) return "";
            
-           if ($this->mId=="") $this->mId = $this->mName;
+           if ($this->id=="") $this->id = $this->name;
            
                $html = "\n\t<select";
-               $html .= " name=\"$this->mName\" id=\"$this->mId\"";
+               $html .= " name=\"$this->name\" id=\"$this->id\"";
                
                if ($this->mSize!="")
                  $html .= " size=\"$this->mSize\"";
@@ -87,6 +87,9 @@ class Combobox extends FormElement {
                   
                if ($this->mStyle!="")
                   $html .= " style=\"$this->mStyle\"";
+                
+                if (!$this->isEnable())
+                  $html .= " disabled";
                   
                $html .= ">\n";   
                if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0))