[!!!][TASK] EXT:form - outsource labels and legends to own partials 50/45350/8
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Fri, 22 Jan 2016 10:52:08 +0000 (11:52 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 29 Jan 2016 09:12:18 +0000 (10:12 +0100)
Move labels and legends to their own partials. This step is slightly
(but thankfully) breaking. The patch allows to avoid duplicate/
redundant code and helps the integrator to override the labels/ legends
with just one small override.

Resolves: #72310
Releases: master
Change-Id: I21781728ac8f35075d05c3cd9df23465d2347abf
Reviewed-on: https://review.typo3.org/45350
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
45 files changed:
typo3/sysext/core/Documentation/Changelog/master/Breaking-72310-EXTform-OutsourceLabelsAndLegendsToOwnPartials.rst [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/AdditionalElements/Label.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/AdditionalElements/Legend.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Checkboxgroup.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Fieldset.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/ContainerElements/Radiogroup.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Checkbox.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Input.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Radio.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Select.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Textarea.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Textfield.html
typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/FlatElements/Upload.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/AdditionalElements/Label.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/AdditionalElements/Legend.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Checkboxgroup.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Fieldset.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/ContainerElements/Radiogroup.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Checkbox.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Input.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Radio.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Select.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Textarea.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Textfield.html
typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/FlatElements/Upload.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/ErrorValidationMessage.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/Label.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/Legend.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/MandatoryValidationMessage.html [new file with mode: 0644]
typo3/sysext/form/Resources/Private/Partials/Default/Show/ContainerElements/Checkboxgroup.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/ContainerElements/Radiogroup.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Button.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/ButtonTag.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Checkbox.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Imagebutton.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Input.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/InputTypeButton.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Password.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Radio.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Reset.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Select.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Submit.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Textarea.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Textfield.html
typo3/sysext/form/Resources/Private/Partials/Default/Show/FlatElements/Upload.html

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-72310-EXTform-OutsourceLabelsAndLegendsToOwnPartials.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72310-EXTform-OutsourceLabelsAndLegendsToOwnPartials.rst
new file mode 100644 (file)
index 0000000..aea5047
--- /dev/null
@@ -0,0 +1,50 @@
+==========================================================================
+Breaking: #72310 - EXT:form - Outsource labels and legends to own partials
+==========================================================================
+
+Description
+===========
+
+Labels and legends have been outsourced to their own partials. This step is slightly (but thankfully) breaking.
+
+With this change the duplication of code can be avoided. This helps the integrator to customize the labels/ legends with just one small and central override.
+
+
+Impact
+======
+
+No deep impact. If an EXT:form template was overridden, it mostly contains the ``label`` and/or ``legend`` tags and acts like it used to do.
+
+
+Affected Installations
+======================
+
+Any installation using EXT:form since TYPO3 7.5.
+
+
+Migration
+=========
+
+Overridden EXT:form partials could be migrated to use the new central label/ legend partials.
+
+Example changes for ``Resources/Private/Partials/Default/Show/FlatElements/Checkbox.html``.
+
+Old:
+
+.. code-block:: html
+
+        <label for="{model.additionalArguments.id}">
+            {model.additionalArguments.label}
+            <f:if condition="{model.mandatoryValidationMessages}">
+                <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
+            </f:if>
+            <f:if condition="{model.validationErrorMessages}">
+                <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
+            </f:if>
+        </label>
+
+New:
+
+.. code-block:: html
+
+        {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/AdditionalElements/Label.html b/typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/AdditionalElements/Label.html
new file mode 100644 (file)
index 0000000..e39cf1f
--- /dev/null
@@ -0,0 +1 @@
+<label>{model.additionalArguments.label}</label>
\ No newline at end of file
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/AdditionalElements/Legend.html b/typo3/sysext/form/Resources/Private/Partials/Default/Confirmation/AdditionalElements/Legend.html
new file mode 100644 (file)
index 0000000..5a70ce3
--- /dev/null
@@ -0,0 +1,3 @@
+<f:if condition="{model.additionalArguments.legend}">
+    <legend>{model.additionalArguments.legend}</legend>
+</f:if>
\ No newline at end of file
index c49c7ad..1018baa 100644 (file)
@@ -7,9 +7,7 @@
                                        {htmAttributeKey}="{htmAttributeValue}"
                                </f:for>
                                >
-                                       <f:if condition="{model.additionalArguments.legend}">
-                                               <legend>{model.additionalArguments.legend}</legend>
-                                       </f:if>
+                                       {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Legend', arguments: {model: model, themeName: themeName})}
                                        <ol>
                                                <f:for each="{model.childElements}" as="element">
                                                        <f:render partial="{themeName}/Confirmation/{element.partialPath}" arguments="{model: element, themeName: themeName}" />
index d6df14d..945aa07 100644 (file)
@@ -7,9 +7,7 @@
                                        {htmAttributeKey}="{htmAttributeValue}"
                                </f:for>
                                >
-                                       <f:if condition="{model.additionalArguments.legend}">
-                                               <legend>{model.additionalArguments.legend}</legend>
-                                       </f:if>
+                                       {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Legend', arguments: {model: model, themeName: themeName})}
                                        <ol>
                                                <f:for each="{model.childElements}" as="element">
                                                        <f:render partial="{themeName}/Confirmation/{element.partialPath}" arguments="{model: element, themeName: themeName}" />
index c49c7ad..1018baa 100644 (file)
@@ -7,9 +7,7 @@
                                        {htmAttributeKey}="{htmAttributeValue}"
                                </f:for>
                                >
-                                       <f:if condition="{model.additionalArguments.legend}">
-                                               <legend>{model.additionalArguments.legend}</legend>
-                                       </f:if>
+                                       {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Legend', arguments: {model: model, themeName: themeName})}
                                        <ol>
                                                <f:for each="{model.childElements}" as="element">
                                                        <f:render partial="{themeName}/Confirmation/{element.partialPath}" arguments="{model: element, themeName: themeName}" />
index a22276f..65fe3e8 100644 (file)
@@ -1,7 +1,7 @@
 <f:if condition="{model.showElement}">
        <f:if condition="{model.additionalArguments.checked} == 'checked'">
                <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-                       <label>{model.additionalArguments.label}</label>
+                       {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                </li>
        </f:if>
 </f:if>
index c7d8c9b..e9c809f 100644 (file)
@@ -1,6 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label>{model.additionalArguments.label}</label>
+               {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                {model.additionalArguments.value}
        </li>
 </f:if>
index dc584e6..fdc36ab 100644 (file)
@@ -1,7 +1,7 @@
 <f:if condition="{model.showElement}">
        <f:if condition="{model.additionalArguments.checked} == 'checked'">
                <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-                       <label>{model.additionalArguments.label}</label>
+                       {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                </li>
        </f:if>
 </f:if>
index 68101e5..2baa6bd 100644 (file)
@@ -2,9 +2,7 @@
 
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label>
-                       {model.additionalArguments.label}
-               </label>
+               {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                <ol>
 </f:if>
 <f:for each="{form:aggregateSelectOptions(model:model)}" as="option">
index 59fb6c3..eaedfd0 100644 (file)
@@ -1,6 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label>{model.additionalArguments.label}</label>
+               {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                {model.additionalArguments.text}
        </li>
 </f:if>
index 138acc4..4145a53 100644 (file)
@@ -1,6 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label>{model.additionalArguments.label}</label>
+               {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                {model.additionalArguments.value}
        </li>
 </f:if>
index 0bd9d2c..fae3e35 100644 (file)
@@ -1,6 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label>{model.additionalArguments.label}</label>
+               {f:render(partial: '{themeName}/Confirmation/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
                <f:for each="{model.additionalArguments.uploadedFiles}" as="uploadedFile">
                        {uploadedFile.name}<br />
                </f:for>
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/AdditionalElements/Label.html b/typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/AdditionalElements/Label.html
new file mode 100644 (file)
index 0000000..9dc9dfb
--- /dev/null
@@ -0,0 +1 @@
+<em>{model.additionalArguments.label}</em>
\ No newline at end of file
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/AdditionalElements/Legend.html b/typo3/sysext/form/Resources/Private/Partials/Default/PostProcessor/Mail/Html/AdditionalElements/Legend.html
new file mode 100644 (file)
index 0000000..e6420be
--- /dev/null
@@ -0,0 +1 @@
+{model.additionalArguments.legend}
\ No newline at end of file
index 022eb93..4fa40c7 100644 (file)
@@ -8,7 +8,7 @@
                                                        <thead>
                                                                <tr>
                                                                        <th colspan="2" align="left">
-                                                                               {model.additionalArguments.legend}
+                                                                               {f:render(partial: 'AdditionalElements/Legend', arguments: {model: model})}
                                                                        </th>
                                                                </tr>
                                                        </thead>
index 2e3fbe7..8b4a9e7 100644 (file)
@@ -8,7 +8,7 @@
                                                        <thead>
                                                                <tr>
                                                                        <th colspan="2" align="left">
-                                                                               {model.additionalArguments.legend}
+                                                                               {f:render(partial: 'AdditionalElements/Legend', arguments: {model: model})}
                                                                        </th>
                                                                </tr>
                                                        </thead>
index 022eb93..4fa40c7 100644 (file)
@@ -8,7 +8,7 @@
                                                        <thead>
                                                                <tr>
                                                                        <th colspan="2" align="left">
-                                                                               {model.additionalArguments.legend}
+                                                                               {f:render(partial: 'AdditionalElements/Legend', arguments: {model: model})}
                                                                        </th>
                                                                </tr>
                                                        </thead>
index 62ece06..f05ecda 100644 (file)
@@ -2,7 +2,7 @@
 <f:if condition="{model.additionalArguments.checked} == 'checked'">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
 </tr>
 </f:if>
index a32f76c..3a53994 100644 (file)
@@ -1,7 +1,7 @@
 <f:if condition="{model.showElement}">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
   <td>{model.additionalArguments.value}</td>
 </tr>
index 716bcb7..77dcb26 100644 (file)
@@ -2,7 +2,7 @@
 <f:if condition="{model.additionalArguments.checked} == 'checked'">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
 </tr>
 </f:if>
index b37519f..e071ed6 100644 (file)
@@ -2,7 +2,7 @@
 <f:if condition="{model.showElement}">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
   <td>
 <f:for each="{form:aggregateSelectOptions(model:model)}" as="option">
index 5ac6424..367fe2a 100644 (file)
@@ -1,7 +1,7 @@
 <f:if condition="{model.showElement}">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;" valign="top">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
   <td>{model.additionalArguments.text}</td>
 </tr>
index a32f76c..3a53994 100644 (file)
@@ -1,7 +1,7 @@
 <f:if condition="{model.showElement}">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
   <td>{model.additionalArguments.value}</td>
 </tr>
index 34082b1..9459c26 100644 (file)
@@ -1,7 +1,7 @@
 <f:if condition="{model.showElement}">
 <tr class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
   <td style="width: 200px;">
-    <em>{model.additionalArguments.label}</em>
+    {f:render(partial: 'AdditionalElements/Label', arguments: {model: model})}
   </td>
   <td>
 <f:for each="{model.additionalArguments.uploadedFiles}" as="uploadedFile">{uploadedFile.name}<br /></f:for>
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/ErrorValidationMessage.html b/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/ErrorValidationMessage.html
new file mode 100644 (file)
index 0000000..891c7c7
--- /dev/null
@@ -0,0 +1,3 @@
+<f:if condition="{model.validationErrorMessages}">
+    <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
+</f:if>
\ No newline at end of file
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/Label.html b/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/Label.html
new file mode 100644 (file)
index 0000000..b4840a4
--- /dev/null
@@ -0,0 +1,5 @@
+<label for="{model.additionalArguments.id}">
+    {model.additionalArguments.label}
+    {f:render(partial: '{themeName}/Show/AdditionalElements/MandatoryValidationMessage', arguments: {model: model, themeName: themeName})}
+    {f:render(partial: '{themeName}/Show/AdditionalElements/ErrorValidationMessage', arguments: {model: model, themeName: themeName})}
+</label>
\ No newline at end of file
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/Legend.html b/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/Legend.html
new file mode 100644 (file)
index 0000000..7ec1275
--- /dev/null
@@ -0,0 +1,7 @@
+<f:if condition="{model.additionalArguments.legend}">
+    <legend>
+        {model.additionalArguments.legend}
+        {f:render(partial: '{themeName}/Show/AdditionalElements/MandatoryValidationMessage', arguments: {model: model, themeName: themeName})}
+        {f:render(partial: '{themeName}/Show/AdditionalElements/ErrorValidationMessage', arguments: {model: model, themeName: themeName})}
+    </legend>
+</f:if>
\ No newline at end of file
diff --git a/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/MandatoryValidationMessage.html b/typo3/sysext/form/Resources/Private/Partials/Default/Show/AdditionalElements/MandatoryValidationMessage.html
new file mode 100644 (file)
index 0000000..4b38cea
--- /dev/null
@@ -0,0 +1,3 @@
+<f:if condition="{model.mandatoryValidationMessages}">
+    <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
+</f:if>
\ No newline at end of file
index cdc702d..fea70de 100644 (file)
@@ -6,17 +6,7 @@
                                {htmAttributeKey}="{htmAttributeValue}"
                        </f:for>
                        >
-                               <f:if condition="{model.additionalArguments.legend}">
-                                       <legend>
-                                               {model.additionalArguments.legend}
-                                               <f:if condition="{model.mandatoryValidationMessages}">
-                                                       <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                                               </f:if>
-                                               <f:if condition="{model.validationErrorMessages}">
-                                                       <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                                               </f:if>
-                                       </legend>
-                               </f:if>
+                               {f:render(partial: '{themeName}/Show/AdditionalElements/Legend', arguments: {model: model, themeName: themeName})}
                                <ol>
                                        <f:for each="{model.childElements}" as="element">
                                                <f:render partial="{themeName}/Show/{element.partialPath}" arguments="{model: element, themeName: themeName}" />
index 2c24465..562311e 100644 (file)
@@ -6,17 +6,7 @@
                                        {htmAttributeKey}="{htmAttributeValue}"
                                </f:for>
                        >
-                               <f:if condition="{model.additionalArguments.legend}">
-                                       <legend>
-                                               {model.additionalArguments.legend}
-                                               <f:if condition="{model.mandatoryValidationMessages}">
-                                                       <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                                               </f:if>
-                                               <f:if condition="{model.validationErrorMessages}">
-                                                       <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                                               </f:if>
-                                       </legend>
-                               </f:if>
+                               {f:render(partial: '{themeName}/Show/AdditionalElements/Legend', arguments: {model: model, themeName: themeName})}
                                <ol>
                                        <f:for each="{model.childElements}" as="element">
                                                <f:render partial="{themeName}/Show/{element.partialPath}" arguments="{model: element, themeName: themeName}" />
index de36b81..c70ea71 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.button
                        class="{model.additionalArguments.class}"
index 6ee26c3..7d3735a 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.button
                        class="{model.additionalArguments.class}"
index cd702e6..2782e80 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:if condition="{model.additionalArguments.multiple}">
                        <f:then>
index bc16f0f..c60c464 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.textfield
                        class="{model.additionalArguments.class}"
index bc16f0f..c60c464 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.textfield
                        class="{model.additionalArguments.class}"
index 2e310cc..ec95478 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.textfield
                        class="{model.additionalArguments.class}"
index 40eef98..f384b7a 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.password
                        class="{model.additionalArguments.class}"
index e3df135..1b1e516 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.radio
                        class="{model.additionalArguments.class}"
index 2e310cc..ec95478 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.textfield
                        class="{model.additionalArguments.class}"
index b305e28..7270eb7 100644 (file)
@@ -2,15 +2,7 @@
 
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <form:select
                        class="{model.additionalArguments.class}"
index 74f733d..cf6c9d2 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.submit
                        additionalAttributes="{model.htmlAttributes}"
index 30d704a..61ff619 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.textarea
                        class="{model.additionalArguments.class}"
index ed0e5a1..14c1d62 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.textfield
                        class="{model.additionalArguments.class}"
index 792563d..9f85830 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <li class="csc-form-{model.elementCounter} csc-form-element csc-form-element-{model.elementTypeLowerCase}">
-               <label for="{model.additionalArguments.id}">
-                       {model.additionalArguments.label}
-                       <f:if condition="{model.mandatoryValidationMessages}">
-                               <em><f:for each="{model.mandatoryValidationMessages}" as="mandatoryValidationMessage" iteration="iterator">{mandatoryValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></em>
-                       </f:if>
-                       <f:if condition="{model.validationErrorMessages}">
-                               <strong><f:for each="{model.validationErrorMessages}" as="errorValidationMessage" iteration="iterator">{errorValidationMessage}<f:if condition="{iterator.isLast}"><f:else> - </f:else></f:if></f:for></strong>
-                       </f:if>
-               </label>
+               {f:render(partial: '{themeName}/Show/AdditionalElements/Label', arguments: {model: model, themeName: themeName})}
 
                <f:form.upload
                        class="{model.additionalArguments.class}"