FIX UploadField name should be unique

Avoid having multiple UploadFields with the same name, whcih in turn would all change at the same time
This commit is contained in:
Thierry François 2018-03-05 10:44:23 +02:00
parent cb123a1793
commit ea0359b76f

View File

@ -330,7 +330,8 @@ class BulkUploader implements GridField_HTMLProvider, GridField_URLHandler
public function bulkUploadField($gridField)
{
$fileRelationName = $this->getFileRelationName($gridField);
$uploadField = BulkUploadField::create($gridField, $fileRelationName, '')
$fieldName = $fileRelationName . '_' . $this->getRecordClassName($gridField) . '_BU';
$uploadField = BulkUploadField::create($gridField, $fieldName, '')
->setForm($gridField->getForm())
/*->setConfig('previewMaxWidth', 20)