X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FCheckboxGroup.class.php;h=13f207d9a758722bbc26a386dbfd7d6aa9fac8c0;hb=cb8e3de960b758147b34d8323054e7de70548619;hp=759a0767acb2ab3dee6ad90b7c4061f1c9b63e78;hpb=6e59f47d1baf9e3d420b4a368dcc005d54b6e599;p=timetracker.git diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index 759a0767..13f207d9 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -41,8 +41,8 @@ class CheckboxGroup extends FormElement { function __construct($name,$value="") { - $this->name = $name; - $this->mValue = $value; + $this->name = $name; + $this->value = $value; } function setChecked($value) { $this->mChecked = $value; } @@ -87,9 +87,9 @@ class CheckboxGroup extends FormElement { $optval = $optval[$this->mDataKeys[1]]; } $html = "name[]\" id=\"$this->id"."_".$i."\""; - if (is_array($this->mValue)) { - foreach ($this->mValue as $value) { - if (($value == $optkey) && ($value != null)) + if (is_array($this->value)) { + foreach ($this->value as $element) { + if (($element == $optkey) && ($element != null)) $html .= " checked=\"true\""; } } @@ -115,9 +115,9 @@ class CheckboxGroup extends FormElement { $optval = $optval[$this->mDataKeys[1]]; } $html = "name[]\" id=\"$this->id"."_".$i."\""; - if (is_array($this->mValue)) { - foreach ($this->mValue as $value) { - if (($value == $optkey) && ($value != null)) + if (is_array($this->value)) { + foreach ($this->value as $element) { + if (($element == $optkey) && ($element != null)) $html .= " checked=\"true\""; } }