X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FCheckbox.class.php;h=6822adf7f64c1c4922f7ff74458dc34f6cc4d987;hb=cb8e3de960b758147b34d8323054e7de70548619;hp=6cd80740d34ec55c67275d89bf2f60edb2be9790;hpb=33399ff6a8bdfe9b989810dafe9c4dbf3cf3b685;p=timetracker.git diff --git a/WEB-INF/lib/form/Checkbox.class.php b/WEB-INF/lib/form/Checkbox.class.php index 6cd80740..6822adf7 100644 --- a/WEB-INF/lib/form/Checkbox.class.php +++ b/WEB-INF/lib/form/Checkbox.class.php @@ -33,10 +33,10 @@ class Checkbox extends FormElement { var $mOptions = null; var $cClassName = "Checkbox"; - function Checkbox($name,$value="") + function __construct($name,$value="") { - $this->mName = $name; - $this->mValue = $value; + $this->name = $name; + $this->value = $value; } function setChecked($value) { $this->mChecked = $value; } @@ -48,10 +48,10 @@ class Checkbox extends FormElement { function toStringControl() { if (!$this->isRenderable()) return ""; - if ($this->mId=="") $this->mId = $this->mName; + if ($this->id=="") $this->id = $this->name; $html = "\n\tmName\" id=\"$this->mId\""; + $html .= " name=\"$this->name\" id=\"$this->id\""; if ($this->mTabindex!="") $html .= " tabindex=\"$this->mTabindex\""; @@ -62,7 +62,7 @@ class Checkbox extends FormElement { 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())