From 680e867fa4ed34c69e295f25c6b75a9abedbdab3 Mon Sep 17 00:00:00 2001 From: Daniel Lienert Date: Fri, 8 Sep 2017 23:25:10 +0200 Subject: [PATCH 1/2] TASK: Add elementClassAttribute also to sections --- Resources/Private/Fusion/Core/AbstractSection.fusion | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Resources/Private/Fusion/Core/AbstractSection.fusion b/Resources/Private/Fusion/Core/AbstractSection.fusion index 62a4921..b6ea370 100644 --- a/Resources/Private/Fusion/Core/AbstractSection.fusion +++ b/Resources/Private/Fusion/Core/AbstractSection.fusion @@ -1,6 +1,9 @@ prototype(Neos.Form.FusionRenderer:AbstractSection) < prototype(Neos.Fusion:Tag) { @context.containerElement = ${this.containerElement} tagName = 'fieldset' + attributes.class = Neos.Fusion:Array { + defaultClass = ${containerElement.properties.elementClassAttribute ? containerElement.properties.elementClassAttribute : null} + } content = Neos.Fusion:Array { legend = Neos.Fusion:Tag { tagName = 'legend' @@ -19,4 +22,4 @@ prototype(Neos.Form.FusionRenderer:AbstractSection) < prototype(Neos.Fusion:Tag) formRuntime = ${formRuntime} formElement = ${containerElement} } -} \ No newline at end of file +} From 9e8df91ba8e19fa751b580f4748356d4e4945310 Mon Sep 17 00:00:00 2001 From: Bastian Date: Thu, 21 Sep 2017 12:38:17 +0200 Subject: [PATCH 2/2] TASK: Tweak Fusion code to prevent empty class attributes --- Resources/Private/Fusion/Core/AbstractSection.fusion | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Resources/Private/Fusion/Core/AbstractSection.fusion b/Resources/Private/Fusion/Core/AbstractSection.fusion index b6ea370..2be7981 100644 --- a/Resources/Private/Fusion/Core/AbstractSection.fusion +++ b/Resources/Private/Fusion/Core/AbstractSection.fusion @@ -1,8 +1,9 @@ prototype(Neos.Form.FusionRenderer:AbstractSection) < prototype(Neos.Fusion:Tag) { @context.containerElement = ${this.containerElement} tagName = 'fieldset' - attributes.class = Neos.Fusion:Array { - defaultClass = ${containerElement.properties.elementClassAttribute ? containerElement.properties.elementClassAttribute : null} + attributes { + class = ${containerElement.properties.elementClassAttribute} + class.@if.hasCustomClass = ${containerElement.properties.elementClassAttribute ? true : false} } content = Neos.Fusion:Array { legend = Neos.Fusion:Tag { @@ -22,4 +23,4 @@ prototype(Neos.Form.FusionRenderer:AbstractSection) < prototype(Neos.Fusion:Tag) formRuntime = ${formRuntime} formElement = ${containerElement} } -} +} \ No newline at end of file