Skip to content

Commit

Permalink
Merge pull request #35 from neos/bugfix-33
Browse files Browse the repository at this point in the history
BUGFIX: Preventing the Rendering of UploadedResourcePreview
  • Loading branch information
markusguenther authored Jan 15, 2025
2 parents c160c99 + 6bf4fc0 commit f3e3fcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Resources/Private/Fusion/Elements/FileUpload.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Fusion/Elements/ImageUpload.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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]'}
}
}
Expand Down

0 comments on commit f3e3fcb

Please sign in to comment.