BUGFIX CheckboxField->Field() was returning HTML code inside HTML code. This should only be assigning values in the $attributes array, and letting createTag() handle the generation of HTML

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56490 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2008-06-18 10:07:56 +00:00
parent 6b1a6d9856
commit d0ad2f14ff

View File

@ -20,9 +20,9 @@ class CheckboxField extends FormField {
'id' => $this->id(),
'name' => $this->Name(),
'value' => 1,
'tabindex' => $this->getTabIndexHTML(),
'checked' => $this->value ? "checked=\"checked\"" : '',
'disabled' => $this->disabled ? " disabled=\"disabled\"" : "",
'tabindex' => $this->getTabIndex(),
'checked' => $this->value ? 'checked' : '',
'disabled' => $this->disabled ? 'disabled' : '',
);
return $this->createTag('input', $attributes);