FIX: formFields were not return in nested set

fieldByName() doesn't work in nested sets (i.e. when Tabs are used). If
no field is return this is now coupled with dataFields()
This commit is contained in:
colymba 2012-07-19 15:50:23 +03:00
parent 8a4066bef9
commit 26690ba84d

View File

@ -151,7 +151,14 @@ class GridFieldBulkImageUpload_Request extends RequestHandler {
$this->recordCMSFieldList = singleton($recordClass)->getCMSFields();
}
return $this->recordCMSFieldList->fieldByName($fieldName);
$field = $this->recordCMSFieldList->fieldByName($fieldName);
if ( !$field ) {
$fields = $this->recordCMSFieldList->dataFields();
$field = $fields[$fieldName];
}
return $field;
}
/**