diff --git a/library/Reporting/Web/Forms/TemplateForm.php b/library/Reporting/Web/Forms/TemplateForm.php index 56088331..6ebe31bf 100644 --- a/library/Reporting/Web/Forms/TemplateForm.php +++ b/library/Reporting/Web/Forms/TemplateForm.php @@ -247,6 +247,15 @@ protected function addColumnSettings($name, $label) ] ]); + $valueType = $this->getValue($type, 'none'); + $populated = $this->getPopulatedValue($value); + if ( + ($valueType === 'image' && ! $populated instanceof UploadedFile) + || ($valueType !== 'image' && $populated instanceof UploadedFile) + ) { + $this->clearPopulatedValue($value); + } + switch ($this->getValue($type, 'none')) { case 'image': $this->addElement('file', $value, [