X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fform%2FCheckboxGroup.class.php;h=9488b5cce24bcb180d0562ce6a2a256ee2459183;hb=817c14c6c2098d85ef912fb95898c857bf533b4f;hp=9d19d2785c47be1fd51345bf0c3b2f64717d6415;hpb=5532fe6cfc2125063ff8040cfa80e20089ac64b0;p=timetracker.git diff --git a/WEB-INF/lib/form/CheckboxGroup.class.php b/WEB-INF/lib/form/CheckboxGroup.class.php index 9d19d278..9488b5cc 100644 --- a/WEB-INF/lib/form/CheckboxGroup.class.php +++ b/WEB-INF/lib/form/CheckboxGroup.class.php @@ -33,17 +33,15 @@ class CheckboxGroup extends FormElement { var $mOptions = array(); var $mLayout = "V"; var $mGroupIn = 1; - var $cClassName = "CheckboxGroup"; var $mDataKeys = array(); var $mDataDeep = 1; var $lSelAll = "All"; var $lSelNone = "None"; - function __construct($name,$value="") - { - $this->name = $name; - $this->value = $value; - } + function __construct($name) { + $this->class = 'CheckboxGroup'; + $this->name = $name; + } function setChecked($value) { $this->mChecked = $value; } function isChecked() { return $this->mChecked; } @@ -60,13 +58,13 @@ class CheckboxGroup extends FormElement { function setGroupIn($value) { $this->mGroupIn = $value; if ($this->mGroupIn<1) $this->mGroupIn = 1;} function getGroupIn() { return $this->mGroupIn; } - function setLocalization($i18n) { - FormElement::setLocalization($i18n); - $this->lSelAll = $i18n->getKey('label.select_all'); - $this->lSelNone = $i18n->getKey('label.select_none'); + function localize() { + global $i18n; + $this->lSelAll = $i18n->get('label.select_all'); + $this->lSelNone = $i18n->get('label.select_none'); } - function toStringControl() { + function getHtml() { if ($this->id=="") $this->id = $this->name; @@ -132,7 +130,7 @@ class CheckboxGroup extends FormElement { $html = "\n\tstyle."\">\n"; $html .= "
\n"; - $html .= ''.$this->lSelAll.' / '.$this->lSelNone.''; + $html .= ''.$this->lSelAll.' / '.$this->lSelNone.''; $html .= "
"; $html .= "\n\t\n"; @@ -147,10 +145,10 @@ class CheckboxGroup extends FormElement { $html .= "
\n"; $str = "