-
Notifications
You must be signed in to change notification settings - Fork 638
/
ImageUpload.html
22 lines (22 loc) · 1.17 KB
/
ImageUpload.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
<formvh:renderRenderable renderable="{element}">
<f:render partial="Field/Field" arguments="{element: element}" contentAs="elementContent">
<formvh:form.uploadedResource
property="{element.identifier}"
as="image"
id="{element.uniqueIdentifier}"
errorClass="{element.properties.elementErrorClassAttribute}"
additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
accept="{element.properties.allowedMimeTypes}"
>
<f:if condition="{image}">
<div id="{element.uniqueIdentifier}-preview">
<a href="{f:uri.image(image: image, maxWidth: element.properties.imageLinkMaxWidth)}" class="{element.properties.elementClassAttribute}">
<f:image image="{image}" maxWidth="{element.properties.imageMaxWidth}" maxHeight="{element.properties.imageMaxHeight}" alt="{formvh:translateElementProperty(element: element, property: 'altText')}" />
</a>
</div>
</f:if>
</formvh:form.uploadedResource>
</f:render>
</formvh:renderRenderable>
</html>