[BUGFIX] Assign elementErrorClassAttribute to ImageUpload and FileUpload element
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Private / Frontend / Partials / ImageUpload.html
1 <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">
2 <formvh:renderRenderable renderable="{element}">
3 <f:render partial="Field/Field" arguments="{element: element}" contentAs="elementContent">
4 <formvh:form.uploadedResource
5 property="{element.identifier}"
6 as="image"
7 id="{element.uniqueIdentifier}"
8 errorClass="{element.properties.elementErrorClassAttribute}"
9 additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
10 accept="{element.properties.allowedMimeTypes}"
11 >
12 <f:if condition="{image}">
13 <div id="{element.uniqueIdentifier}-preview">
14 <a href="{f:uri.image(image: image, maxWidth: element.properties.imageLinkMaxWidth)}" class="{element.properties.elementClassAttribute}">
15 <f:image image="{image}" maxWidth="{element.properties.imageMaxWidth}" maxHeight="{element.properties.imageMaxHeight}" alt="{formvh:translateElementProperty(element: element, property: 'altText')}" />
16 </a>
17 </div>
18 </f:if>
19 </formvh:form.uploadedResource>
20 </f:render>
21 </formvh:renderRenderable>
22 </html>