X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/6e59f47d1baf9e3d420b4a368dcc005d54b6e599..3a5964df63eb410b66e02326ebc7f7c90e8d606e:/WEB-INF/lib/form/CheckboxGroup.class.php
diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php
index 759a0767..9f5cc053 100644
--- a/WEB-INF/lib/form/CheckboxGroup.class.php
+++ b/WEB-INF/lib/form/CheckboxGroup.class.php
@@ -33,7 +33,7 @@ class CheckboxGroup extends FormElement {
var $mOptions = array();
var $mLayout = "V";
var $mGroupIn = 1;
- var $cClassName = "CheckboxGroup";
+ var $class = 'CheckboxGroup';
var $mDataKeys = array();
var $mDataDeep = 1;
var $lSelAll = "All";
@@ -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; }
@@ -66,9 +66,8 @@ class CheckboxGroup extends FormElement {
$this->lSelNone = $i18n->getKey('label.select_none');
}
- function toStringControl() {
- if (!$this->isRenderable()) return "";
-
+ function toStringControl() {
+
if ($this->id=="") $this->id = $this->name;
$renderArray = array();
@@ -87,9 +86,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 +114,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\"";
}
}
@@ -132,8 +131,8 @@ class CheckboxGroup extends FormElement {
}
- $html = "\n\t