]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/form/Checkbox.class.php
Refactoring. Moved a member out of base class.
[timetracker.git] / WEB-INF / lib / form / Checkbox.class.php
index 8ee4fea03fdc319321558727765a6460855cbb4c..d79e5fe75e2f9a93444d5b2c252f8bb8f69460f9 100644 (file)
@@ -35,8 +35,8 @@ class Checkbox extends FormElement {
 
        function __construct($name,$value="")
        {
-               $this->name                     = $name;
-               $this->mValue                   = $value;
+               $this->name = $name;
+               $this->value = $value;
        }
 
        function setChecked($value)     { $this->mChecked = $value; }
@@ -52,17 +52,14 @@ class Checkbox extends FormElement {
            
                $html = "\n\t<input type=\"checkbox\"";
                $html .= " name=\"$this->name\" id=\"$this->id\"";
-               
-               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->mChecked || (($this->mValue == $this->mOptions) && ($this->mValue != null)))
+               if ($this->mChecked || (($this->value == $this->mOptions) && ($this->value != null)))
                   $html .= " checked=\"true\"";
                   
                if (!$this->isEnable())