diff --git a/Resources/Private/Fusion/Elements/FileUpload.fusion b/Resources/Private/Fusion/Elements/FileUpload.fusion index c1610ad..3d2d5fb 100644 --- a/Resources/Private/Fusion/Elements/FileUpload.fusion +++ b/Resources/Private/Fusion/Elements/FileUpload.fusion @@ -11,6 +11,7 @@ prototype(Neos.Form:FileUpload) < prototype(Neos.Form.FusionRenderer:FormElement } content = ${elementValue.fileName} @if.hasUploadedResource = ${elementValue ? true : false} + @if.hasNoValidationErrors = ${!elementHasValidationErrors} } uploadedResourceHiddenField = Neos.Fusion:Tag { @position = 'before field' diff --git a/Resources/Private/Fusion/Elements/ImageUpload.fusion b/Resources/Private/Fusion/Elements/ImageUpload.fusion index 8793134..495414c 100644 --- a/Resources/Private/Fusion/Elements/ImageUpload.fusion +++ b/Resources/Private/Fusion/Elements/ImageUpload.fusion @@ -14,6 +14,7 @@ prototype(Neos.Form:ImageUpload) < prototype(Neos.Form.FusionRenderer:FormElemen maximumWidth = 200 } @if.hasUploadedImage = ${elementValue ? true : false} + @if.hasNoValidationErrors = ${!elementHasValidationErrors} } uploadedImageHiddenField = Neos.Fusion:Tag { @position = 'before field' @@ -29,6 +30,7 @@ prototype(Neos.Form:ImageUpload) < prototype(Neos.Form.FusionRenderer:FormElemen tagName = 'input' attributes { type = 'file' + accept = ${Neos.Form.FusionRenderer.getAcceptFromAllowedExtensions(element.properties.allowedTypes)} name = ${elementName + '[resource]'} } }