diff --git a/CHANGELOG.txt b/CHANGELOG.txt index b041f29068..a3c941784b 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -50,6 +50,7 @@ v23.0.00 Reports: fixed Left students showing up in the Archive by Student list Reports: fixed error with empty milestones when creating a Reporting Cycle Reports: fixed issue where re-sending a report will break existing report download links + Reports: fixed file uploads not working in Template Builder Students: fixed ID card background image alignment System Admin: fixed importing custom fields that have spaces around the values System Admin: fixed importing custom fields failing when existing fields value is null diff --git a/src/Forms/Input/CustomField.php b/src/Forms/Input/CustomField.php index 985bd67609..688f0b1d8d 100644 --- a/src/Forms/Input/CustomField.php +++ b/src/Forms/Input/CustomField.php @@ -87,11 +87,13 @@ public function __construct(FormFactoryInterface $factory, $name, $fields) break; case 'image': - $this->customField = $this->factory->createFileUpload($name.'File')->accepts('.jpg,.jpeg,.gif,.png,.svg'); + $fieldName = stripos($name, '[') !== false ? $name : $name.'File'; + $this->customField = $this->factory->createFileUpload($fieldName)->accepts('.jpg,.jpeg,.gif,.png,.svg'); break; case 'file': - $this->customField = $this->factory->createFileUpload($name.'File'); + $fieldName = stripos($name, '[') !== false ? $name : $name.'File'; + $this->customField = $this->factory->createFileUpload($fieldName); if (!empty($options)) { $this->customField->accepts($options); }