MINOR: #2322 - Editable Checkbox Groups in user defined forms should display the field's name, not

a pointless number (DanielVF)


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@56942 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2008-06-25 05:35:17 +00:00
parent 5ec9ff8862
commit 9faf153965

View File

@ -137,11 +137,13 @@ class EditableCheckboxGroupField extends EditableFormField {
$selectedOptions = DataObject::get('EditableCheckboxOption', "ParentID={$this->ID} AND ID IN (" . implode(',', $entries) . ")");
foreach($selectedOptions as $selected) {
if( !$result )
$result = $selected->ID;
else
$result .= "," . $selected->ID;
if(!$result) {
$result = $selected->Title;
} else {
$result .= "," . $selected->Title;
}
}
return $result;
}
@ -150,4 +152,5 @@ class EditableCheckboxGroupField extends EditableFormField {
return $option->EditSegment();
}
}
?>