BUGFIX: throws an exception when readonly or/and default properties are not set to true

This commit is contained in:
Saophalkun Ponlu 2009-01-22 20:55:58 +00:00
parent 0492ab7955
commit 084d20b739

View File

@ -66,9 +66,13 @@ class EditableCheckboxOption extends DataObject {
function DefaultSelect() {
if( $this->readonly )
$disabled = " disabled=\"disabled\"";
else
$disabled = '';
if( $this->getField('Default') )
$default = " checked=\"checked\"";
else
$default = '';
return "<input class=\"checkbox\" type=\"checkbox\" name=\"Fields[{$this->ParentID}][{$this->ID}][Default]\" value=\"1\"".$disabled.$default." />";
}