[BUGFIX] Assign elementErrorClassAttribute to ImageUpload and FileUpload element
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Private / Frontend / Partials / FileUpload.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="resource"
7 id="{element.uniqueIdentifier}"
8 class="{element.properties.elementClassAttribute}"
9 errorClass="{element.properties.elementErrorClassAttribute}"
10 additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
11 accept="{element.properties.allowedMimeTypes}"
12 >
13 <f:if condition="{resource}">
14 <div id="{element.uniqueIdentifier}-preview">
15 {resource.originalResource.originalFile.name}
16 </div>
17 </f:if>
18 </formvh:form.uploadedResource>
19 </f:render>
20 </formvh:renderRenderable>
21 </html>