(UIModelGrid) return all selected items for list types

This commit is contained in:
Ad Schellevis 2016-12-19 17:45:54 +01:00
parent 7f91fe62b1
commit 74b0ed0002

View File

@ -105,12 +105,17 @@ class UIModelGrid
if ($record->$fieldname != null) {
$row[$fieldname] = $record->$fieldname->getNodeData();
if (is_array($row[$fieldname])) {
foreach ($row[$fieldname] as $fieldKey => $fieldValue) {
$listItems = $row[$fieldname];
$row[$fieldname] = '';
foreach ($listItems as $fieldValue) {
if ($fieldValue['selected'] == 1) {
$row[$fieldname] = $fieldValue['value'];
if (!empty($row[$fieldname])) {
$row[$fieldname] .= ',';
}
$row[$fieldname] .= $fieldValue['value'];
}
}
if (is_array($row[$fieldname])) {
if (empty($row[$fieldname])) {
$row[$fieldname] = "##Unlinked";
}
}