Refactoring - removed unused tabindex.
[timetracker.git] / WEB-INF / lib / form / Combobox.class.php
index dcb84a2..a421b66 100644 (file)
@@ -48,8 +48,8 @@ class Combobox extends FormElement {
 
        function __construct($name,$value="")
        {
-               $this->mName                    = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function setMultiple($value)    { $this->mMultiple = $value; }
@@ -68,20 +68,17 @@ 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\"";
+               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\"";
                   
@@ -95,7 +92,7 @@ class Combobox extends FormElement {
                if (is_array($this->mOptionsEmpty) && (count($this->mOptionsEmpty) > 0))
                foreach ($this->mOptionsEmpty as $key=>$value) {
                        $html .= "<option value=\"".$key."\"";
-                       if (($this->mValue == $value) && ($this->mValue != '')) $html .= " selected";
+                       if (($this->value == $value) && ($this->value != '')) $html .= " selected";
                        $html .= ">".$value."</option>\n";
                }
                if (is_array($this->mOptions) && (count($this->mOptions) > 0))
@@ -106,7 +103,7 @@ class Combobox extends FormElement {
                                $value = $value[$this->mDataKeys[1]];
                        }
                        $html .= "<option value=\"".$key."\"";
-                       if (($this->mValue == $key) && ($this->mValue != '')) $html .= " selected";
+                       if (($this->value == $key) && ($this->value != '')) $html .= " selected";
                        $html .= ">".htmlspecialchars($value)."</option>\n";
                }