Commit 89607057 authored by Andreas Nedbal's avatar Andreas Nedbal

Merge branch '602-fix-form-styling' into 'master'

Resolve "Fix form styling"

Closes #602

See merge request !565
parents 0b9841bb e8cb3f5a
......@@ -15,8 +15,12 @@ TYPO3:
formElementsDefinition:
Form:
renderingOptions:
templateRootPaths:
100: 'EXT:t3olayout/Resources/Private/Templates/Form/Templates/'
partialRootPaths:
100: 'EXT:t3olayout/Resources/Private/Templates/Form/Partials/'
100: 'EXT:t3olayout/Resources/Private/Partials/Form/'
layoutRootPaths:
100: 'EXT:t3olayout/Resources/Private/Layouts/Form/'
finishersDefinition:
Gitlab:
implementationClassName: 'T3o\T3olayout\Domain\Finishers\GitlabFinisher'
......
<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, doNotShowLabel: 1}" contentAs="elementContent">
<div class="form-check">
<label class="{element.properties.elementClassAttribute} form-check-label" for="{element.uniqueIdentifier}">
<f:form.checkbox
property="{element.identifier}"
id="{element.uniqueIdentifier}"
class="{element.properties.elementClassAttribute} form-check-input"
value="{element.properties.value}"
errorClass="{element.properties.elementErrorClassAttribute}"
additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
/>
<span>{formvh:translateElementProperty(element: element, property: 'label')}<f:if condition="{element.required}"><f:render partial="Field/Required" /></f:if></span>
</label>
</div>
</f:render>
</formvh:renderRenderable>
</html>
<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">
<f:form.validationResults for="{element.rootForm.identifier}.{element.identifier}">
<div class="form-group{f:if(condition: '{validationResults.errors.0}', then: ' has-error')}">
<f:if condition="{doNotShowLabel} != 1">
<label class="control-label" for="{element.uniqueIdentifier}">
{formvh:translateElementProperty(element: element, property: 'label')}
<f:if condition="{element.required}">
<f:render partial="Field/Required" />
</f:if>
</label>
</f:if>
<div class="{element.properties.containerClassAttribute}">
<f:format.raw>
{elementContent}
<f:if condition="{validationResults.flattenedErrors}">
<span class="error help-block" role="alert">
<f:for each="{validationResults.errors}" as="error">
{formvh:translateElementError(element: element, error: error)}
<br />
</f:for>
</span>
</f:if>
</f:format.raw>
<f:if condition="{doNotShowLabel} != 1">
<f:if condition="{element.properties.elementDescription}">
<small class="help-block form-text text-muted">{formvh:translateElementProperty(element: element, property: 'elementDescription')}</small>
</f:if>
</f:if>
</div>
</div>
</f:form.validationResults>
</html>
<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">
<div class="{element.properties.containerClassAttribute}">
<div id="{element.uniqueIdentifier}" class="inputs-list">
<f:for each="{element.properties.options}" as="label" key="value" iteration="idIterator">
<div class="radio form-check">
<label for="{element.uniqueIdentifier}-{idIterator.index}">
<f:form.radio
property="{element.identifier}"
id="{element.uniqueIdentifier}-{idIterator.index}"
class="{element.properties.elementClassAttribute} form-check-input"
value="{value}"
errorClass="{element.properties.elementErrorClassAttribute}"
additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
/>
<span>{formvh:translateElementProperty(element: element, property: '{0: \'options\', 1: value}')}</span>
</label>
</div>
</f:for>
</div>
</div>
</f:render>
</formvh:renderRenderable>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment