Skip to content
Snippets Groups Projects
Commit 15eccd83 authored by Mathias Brodala's avatar Mathias Brodala Committed by Christian Kuhn
Browse files

[BUGFIX] Allow "Fieldset" form element w/o "fluidAdditionalAttributes"

This is a mitigation of an issue introduced
with #102291, where f:for now tends to iterate
an empty string and crashes.

Resolves: #104612
Related: #102291
Releases: main, 12.4
Change-Id: Id462532e732e421eac04c09b267b0f80ca522ea6
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/85631


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent de6fd229
Branches
Tags
No related merge requests found
<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:variable name="fluidAdditionalAttributes" value="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"/>
<f:variable name="additionalAttributes" value="" />
<f:for each="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}" as="value" key="key">
<f:variable name="additionalAttributes" value='{additionalAttributes} {key}="{value}"' />
</f:for>
<f:if condition="{fluidAdditionalAttributes}">
<f:for each="{fluidAdditionalAttributes}" as="value" key="key">
<f:variable name="additionalAttributes" value='{additionalAttributes} {key}="{value}"' />
</f:for>
</f:if>
<fieldset id="{element.uniqueIdentifier}"
class="form-group{f:if(condition: element.properties.elementClassAttribute, then: ' {element.properties.elementClassAttribute}')}"
{additionalAttributes -> f:format.raw()}>
......
<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:variable name="fluidAdditionalAttributes" value="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"/>
<f:variable name="additionalAttributes" value="" />
<f:for each="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}" as="value" key="key">
<f:variable name="additionalAttributes" value='{additionalAttributes} {key}="{value}"' />
</f:for>
<f:if condition="{fluidAdditionalAttributes}">
<f:for each="{fluidAdditionalAttributes}" as="value" key="key">
<f:variable name="additionalAttributes" value='{additionalAttributes} {key}="{value}"' />
</f:for>
</f:if>
<fieldset id="{element.uniqueIdentifier}" class="{element.properties.elementClassAttribute}" {additionalAttributes -> f:format.raw()}>
<f:if condition="{element.label}">
<legend>{formvh:translateElementProperty(element: element, property: 'label')}</legend>
......
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