Skip to content

Commit

Permalink
[FIX] compatibility with Flow5
Browse files Browse the repository at this point in the history
Resolves #1
  • Loading branch information
Hans Höchtl committed Aug 27, 2019
1 parent 3626a64 commit ea35010
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Configuration/Settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Neos:
actionClassAttribute: col-12
'Neos.Form:FormElement':
properties:
labelClassAttribute: 'col-sm-2 control-label'
containerClassAttribute: 'form-group row'
containerInnerClassAttribute: col-sm-10
labelClassAttribute: ''
containerClassAttribute: 'form-group'
containerInnerClassAttribute: ''
elementClassAttribute: form-control
elementErrorClassAttribute: has-error
elementType: text
Expand Down
4 changes: 2 additions & 2 deletions Resources/Private/Templates/Form/Checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:form="http://typo3.org/ns/Neos/Form/ViewHelpers"
xmlns:neos="http://typo3.org/ns/Neos/Neos/ViewHelpers">
<body>
<f:form.validationResults for="{element.identifier}">
<f:validation.results for="{element.identifier}">
<div class="{element.properties.containerClassAttribute}{f:if(condition: validationResults.flattenedErrors, then: element.properties.elementErrorClassAttribute)}"<f:if condition="{element.rootForm.renderingOptions.previewMode}"> data-element="{form:form.formElementRootlinePath(renderable:element)}"</f:if>>
<div class="{element.properties.containerInnerClassAttribute}">
<div class="checkbox">
Expand All @@ -29,6 +29,6 @@
</div>
</div>
</div>
</f:form.validationResults>
</f:validation.results>
</body>
</html>
6 changes: 6 additions & 0 deletions Resources/Private/Templates/Form/FormEditMode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{namespace form=Neos\Form\ViewHelpers}
<form:form action="index" object="{form}" method="post" id="{form.identifier}" section="{form.identifier}" enctype="multipart/form-data">
<f:for each="{form.pages}" as="page">
<form:renderRenderable renderable="{page}" />
</f:for>
</form:form>
4 changes: 2 additions & 2 deletions Resources/Private/Templates/Form/Layouts/Field.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
xmlns:form="http://typo3.org/ns/Neos/Form/ViewHelpers"
xmlns:neos="http://typo3.org/ns/Neos/Neos/ViewHelpers">
<body>
<f:form.validationResults for="{element.identifier}">
<f:validation.results for="{element.identifier}">
<div class="{element.properties.containerClassAttribute} {f:if(condition: validationResults.flattenedErrors, then: element.properties.elementErrorClassAttribute)}"<f:if condition="{element.rootForm.renderingOptions.previewMode}"> data-element="{form:form.formElementRootlinePath(renderable:element)}"</f:if>>
<label class="{element.properties.labelClassAttribute}" for="{element.uniqueIdentifier}">
<f:translate id="form.label.{element.identifier}"
Expand All @@ -27,6 +27,6 @@
</f:if>
</div>
</div>
</f:form.validationResults>
</f:validation.results>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
property="{element.identifier}"
id="{element.uniqueIdentifier}"
class="{element.properties.elementClassAttribute}"
placeholder="{f:translate(id: 'form.placeholder.{element.identifier}', source: '{element.renderingOptions.translationSource}', package: '{element.renderingOptions.translationPackage}', value: '{element.properties.placeholder}')}"
placeholder="{element -> form:translateElementProperty(property: 'placeholder')}"
maxlength="{element.properties.maxlength}"
required="{element.required}"/>
</f:section>
</body>
Expand Down
16 changes: 16 additions & 0 deletions Resources/Private/Templates/Form/TwoColumns.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{namespace form=Neos\Form\ViewHelpers}
<div class="row">
<f:if condition="{container.label}">
<h2>{container.label}</h2>
</f:if>
<div class="col-sm-6">
<f:for each="{container.column1Elements}" as="element">
<form:renderRenderable renderable="{element}" />
</f:for>
</div>
<div class="col-sm-6">
<f:for each="{container.column2Elements}" as="element">
<form:renderRenderable renderable="{element}" />
</f:for>
</div>
</div>

0 comments on commit ea35010

Please sign in to comment.