mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
5ec9ff8862
commit
9faf153965
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user