[TASK] EXT:form - allow <error /> and <mandatory /> outside of <label /> 25/43525/6
authorRalf Zimmermann <ralf.zimmermann@tritum.de>
Sat, 26 Sep 2015 16:55:43 +0000 (18:55 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 28 Sep 2015 08:49:23 +0000 (10:49 +0200)
Allow <error /> and <mandatory /> tags outside of a <label /> tag.

Resolves: #70071
Releases: master
Change-Id: Ibac5445711bfe982e3f0c06bb239f4f2fbd66c0d
Reviewed-on: http://review.typo3.org/43525
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
22 files changed:
typo3/sysext/form/Classes/Utility/CompatibilityLayerUtility.php
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Checkbox.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Input.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Radio.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Select.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Textarea.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Textfield.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Confirmation/FlatElements/Upload.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Button.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/ButtonTag.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Checkbox.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Imagebutton.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Input.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/InputTypeButton.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Password.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Radio.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Reset.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Select.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Submit.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Textarea.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Textfield.html
typo3/sysext/form/Resources/Private/Partials/Compatibility/Show/FlatElements/Upload.html

index 27d1267..7a63671 100644 (file)
@@ -211,35 +211,6 @@ class CompatibilityLayerUtility {
                        return;
                }
                if (in_array($element->getElementType(), $this->registeredFormElements)) {
-                       /* layout.label */
-                       if (!in_array($element->getElementType(), $this->elementsWithoutLabel)) {
-                               $labelLayout = $this->getGlobalLayoutByElementType('LABEL');
-                               $mandatoryLayout = '';
-                               $errorLayout = '';
-                               if ($this->formBuilder->getControllerAction() === 'show') {
-                                       /* layout.mandatory */
-                                       $mandatoryMessages = $this->formBuilder->getValidationBuilder()->getMandatoryValidationMessagesByElementName($element->getName());
-                                       if (count($mandatoryMessages) > 0) {
-                                               $mandatoryLayout = $this->replaceLabelContent('mandatory', $mandatoryMessages);
-                                       }
-                                       /* layout.error */
-                                       $errorMessages = $element->getValidationErrorMessages();
-                                       if (count($errorMessages) > 0) {
-                                               $errorLayout = $this->replaceLabelContent('error', $errorMessages);
-                                       }
-                               }
-                               /* Replace the mandatory and error messages */
-                               $mandatoryReturn = $this->replaceTagWithMarker('mandatory', 'body', $labelLayout);
-                               $labelLayout = str_replace($mandatoryReturn['marker'], $mandatoryLayout, $mandatoryReturn['html']);
-                               $errorReturn = $this->replaceTagWithMarker('error', 'body', $labelLayout);
-                               $labelLayout = str_replace($errorReturn['marker'], $errorLayout, $errorReturn['html']);
-                               /* Replace the label value */
-                               $labelValueReturn = $this->replaceTagWithMarker('labelvalue', 'body', $labelLayout);
-                               $labelLayout = str_replace($labelValueReturn['marker'], $element->getAdditionalArgument('label'), $labelValueReturn['html']);
-                               $layout = $element->getLayout();
-                               $layout['label'] = $labelLayout;
-                               $element->setLayout($layout);
-                       }
                        /* Get the element layout definition or fallback to the global definition (if set) */
                        if (isset($userConfiguredElementTyposcript['layout'])) {
                                $elementLayout = $userConfiguredElementTyposcript['layout'];
@@ -250,39 +221,68 @@ class CompatibilityLayerUtility {
                        $elementWrap = NULL;
                        if ($elementLayout) {
                                $elementWrap = $this->determineElementOuterWraps($element->getElementType(), $elementLayout);
-                               if ($elementWrap['marker'] !== '') {
-                                       /*
-                                        * Dedect the label position.
-                                        * Things like layout.textline = <input /><div class="before label"><label /></div>
-                                        * are NOT supported.
-                                        * To wrap the label, you must use layout.label
-                                        * All around the <input /> tag will be interpreted as elementOuterWrap.
-                                        * The position of the label is detected by "if it before or after the <input /> tag".
-                                        * Then the template will place the label before or after the element.
-                                        * Things like
-                                        * layout.textline = <div class="form-element"><input /><div class="sibling after"></div><label /></div>
-                                        * result in a html like
-                                        * <div class="form-element"><input ... /><label ... /><div class="sibling after"></div></div>
-                                        * That means every layout that is not like <some><tags><input /><label /></some></tags>
-                                        * or <some><tags><label /><input /></some></tags> result in another markup.
-                                        * Sorry guys.
-                                        * */
-                                       if (!in_array($element->getElementType(), $this->elementsWithoutLabel)) {
+                               if ($elementWrap['html'] !== '') {
+                                       /* layout.label */
+                                       if (!in_array($element->getElementType(), $this->elementsWithoutLabel, TRUE)) {
+                                               $labelLayout = $this->getGlobalLayoutByElementType('LABEL');
+                                               $mandatoryLayout = '';
+                                               $errorLayout = '';
+                                               if ($this->formBuilder->getControllerAction() === 'show') {
+                                                       /* layout.mandatory */
+                                                       $mandatoryMessages = $this->formBuilder->getValidationBuilder()->getMandatoryValidationMessagesByElementName($element->getName());
+                                                       if (!empty($mandatoryMessages)) {
+                                                               $mandatoryLayout = $this->replaceLabelContent('mandatory', $mandatoryMessages);
+                                                       }
+                                                       /* layout.error */
+                                                       $errorMessages = $element->getValidationErrorMessages();
+                                                       if (!empty($errorMessages)) {
+                                                               $errorLayout = $this->replaceLabelContent('error', $errorMessages);
+                                                       }
+                                               }
+                                               /* Replace the mandatory and error messages */
+                                               $mandatoryReturn = $this->replaceTagWithMarker('mandatory', 'body', $labelLayout);
+                                               $labelContainContent = FALSE;
+                                               if ($mandatoryReturn['html'] !== '') {
+                                                       if (!empty($mandatoryLayout)) {
+                                                               $labelContainContent = TRUE;
+                                                       }
+                                                       $labelLayout = str_replace($mandatoryReturn['marker'], $mandatoryLayout, $mandatoryReturn['html']);
+                                               }
+                                               $errorReturn = $this->replaceTagWithMarker('error', 'body', $labelLayout);
+                                               if ($errorReturn['html'] !== '') {
+                                                       if (!empty($errorLayout)) {
+                                                               $labelContainContent = TRUE;
+                                                       }
+                                                       $labelLayout = str_replace($errorReturn['marker'], $errorLayout, $errorReturn['html']);
+                                               }
+                                               /* Replace the label value */
+                                               $labelValueReturn = $this->replaceTagWithMarker('labelvalue', 'body', $labelLayout);
+                                               if ($labelValueReturn['html'] !== '') {
+                                                       if (!empty($element->getAdditionalArgument('label'))) {
+                                                               $labelContainContent = TRUE;
+                                                       }
+                                                       $labelLayout = str_replace($labelValueReturn['marker'], $element->getAdditionalArgument('label'), $labelValueReturn['html']);
+                                               }
+                                               if (!$labelContainContent) {
+                                                       $labelLayout = '';
+                                               }
+                                               /* Replace <label />, <error /> and <mandatory /> in the element wrap html */
                                                $labelReturn = $this->replaceTagWithMarker('label', 'body', $elementWrap['html']);
-                                               $elementWrap = explode($elementWrap['marker'], $labelReturn['html']);
-                                               $labelPosition = 'before';
-                                               if (strpos($elementWrap[0], $labelReturn['marker']) !== FALSE) {
-                                                       $elementWrap[0] = str_replace($labelReturn['marker'], '', $elementWrap[0]);
-                                               } else if (strpos($elementWrap[1], $labelReturn['marker']) !== FALSE) {
-                                                       $labelPosition = 'after';
-                                                       $elementWrap[1] = str_replace($labelReturn['marker'], '', $elementWrap[1]);
+                                               if ($labelReturn['html'] !== '') {
+                                                       $elementWrap['html'] = str_replace($labelReturn['marker'], $labelLayout, $labelReturn['html']);
+                                               }
+                                               $errorReturn = $this->replaceTagWithMarker('error', 'body', $elementWrap['html']);
+                                               if ($errorReturn['html'] !== '') {
+                                                       $elementWrap['html'] = str_replace($errorReturn['marker'], $errorLayout, $errorReturn['html']);
+                                               }
+                                               $mandatoryReturn = $this->replaceTagWithMarker('mandatory', 'body', $elementWrap['html']);
+                                               if ($mandatoryReturn['html'] !== '') {
+                                                       $elementWrap['html'] = str_replace($mandatoryReturn['marker'], $mandatoryLayout, $mandatoryReturn['html']);
                                                }
-                                               $layout = $element->getLayout();
-                                               $layout['labelPosition'] = $labelPosition;
-                                               $element->setLayout($layout);
-                                       } else {
-                                               $elementWrap = explode($elementWrap['marker'], $elementWrap['html']);
                                        }
+                                       $elementWrap = explode($elementWrap['marker'], $elementWrap['html']);
+                               } else {
+                                       $elementWrap = NULL;
                                }
                        }
                        /* Set element outer wraps and set the default classes */
@@ -434,43 +434,6 @@ class CompatibilityLayerUtility {
        }
 
        /**
-        * Try to detect if a label before or after the element.
-        * If the position is found, delete the tag because the
-        * label content is already known and the positioning
-        * is done with fluid.
-        *
-        * @param string $wrapParts
-        * @return NULL|string
-        */
-       protected function determineLabelPositionAndDeleteTheLabelTag($html) {
-               $dom = new \DOMDocument('1.0', 'utf-8');
-               $dom->preserveWhiteSpace = FALSE;
-               $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
-               if (!$dom) {
-                       return NULL;
-               }
-               $nodes = $dom->getElementsByTagName('label');
-               if (!$nodes->length) {
-                       return NULL;
-               } else {
-                       $labelNode = $nodes->item(0);
-                       $parentNode = $labelNode->parentNode;
-                       $parentNode->removeChild($labelNode);
-                               $html = $dom->saveHTML();
-                               if ($key == 0) {
-                                       $position = 'before';
-                               } else {
-                                       $position = 'after';
-                               }
-                               return array(
-                                       'position' => $position,
-                                       'elementWrap' => $wrapParts
-                               );
-                       }
-               return NULL;
-       }
-
-       /**
         * Replace a html tag with a uniqe marker
         *
         * @param string $tagName
index 6f23c5e..218f055 100644 (file)
@@ -1,7 +1,6 @@
 <f:if condition="{model.showElement}">
        <f:if condition="{model.additionalArguments.checked} == 'checked'">
                <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-                       <f:format.raw>{model.layout.label}</f:format.raw>
                <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
        </f:if>
 </f:if>
index a4c5454..1f4cebc 100644 (file)
@@ -1,14 +1,6 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                {model.additionalArguments.value}
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
 
index 560a977..1c18e38 100644 (file)
@@ -1,7 +1,6 @@
 <f:if condition="{model.showElement}">
        <f:if condition="{model.additionalArguments.checked} == 'checked'">
                <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-                       <f:format.raw>{model.layout.label}</f:format.raw>
                <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
        </f:if>
 </f:if>
@@ -23,4 +22,4 @@
 
                additionalAttributes="{model.htmlAttributes}"
        />
-</f:if>
\ No newline at end of file
+</f:if>
index d62b844..ae70c1b 100644 (file)
@@ -2,9 +2,6 @@
 
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-       <f:if condition="{model.layout.labelPosition} == 'before'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
                <ol>
 </f:if>
                <f:for each="<form:aggregateSelectOptions model='{model}' />" as="option">
@@ -65,8 +62,5 @@
                </f:for>
 <f:if condition="{model.showElement}">
                </ol>
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index f413bf9..4c4bab2 100644 (file)
@@ -1,12 +1,6 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-       <f:if condition="{model.layout.labelPosition} == 'before'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
        {model.additionalArguments.value}
-       <f:if condition="{model.layout.labelPosition} == 'after'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
 
index f413bf9..4c4bab2 100644 (file)
@@ -1,12 +1,6 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-       <f:if condition="{model.layout.labelPosition} == 'before'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
        {model.additionalArguments.value}
-       <f:if condition="{model.layout.labelPosition} == 'after'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
 
index b9de6f0..1afa3ca 100644 (file)
@@ -1,13 +1,7 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-       <f:if condition="{model.layout.labelPosition} == 'before'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
        <f:for each="{model.additionalArguments.uploadedFiles}" as="uploadedFile">
                {uploadedFile.originalFilename}<br />
        </f:for>
-       <f:if condition="{model.layout.labelPosition} == 'after'">
-               <f:format.raw>{model.layout.label}</f:format.raw>
-       </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index 1e73abe..36369a2 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.button
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -23,9 +19,5 @@
 
                        additionalAttributes="{model.htmlAttributes}"
                >{model.additionalArguments.value}</f:form.button>
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index e361ff4..a29643c 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.button
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -21,9 +17,5 @@
                        autofocus="{model.additionalArguments.autofocus}"
                        type="{model.additionalArguments.type}"
                >{model.attributes.value.value}</f:form.button>
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index cb585ff..33663b9 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:if condition="{model.additionalArguments.multiple}">
                        <f:then>
                                <f:form.checkbox
@@ -48,9 +44,5 @@
                                />
                        </f:else>
                </f:if>
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index 78a9e12..5a5c22f 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.textfield
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -29,9 +25,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index 1c7225b..7231637 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.textfield
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -29,9 +25,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index 78a9e12..5a5c22f 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.textfield
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -29,9 +25,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index abc539b..90aa7c5 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.password
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -24,9 +20,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index 52ec1ff..7242f99 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.radio
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -23,9 +19,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index 78a9e12..5a5c22f 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.textfield
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -29,9 +25,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index d7069df..e3b15c5 100644 (file)
@@ -2,10 +2,6 @@
 
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <form:select
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -34,9 +30,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index 2491191..c8c52f0 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.submit
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -18,9 +14,5 @@
                        name="{model.additionalArguments.prefix}[{model.additionalArguments.name}]"
                        value="{model.additionalArguments.value}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index cf42e7c..d23419b 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.textarea
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -26,9 +22,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
index f069968..3507e5f 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.textfield
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -29,9 +25,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file
index d6e50e4..79149bd 100644 (file)
@@ -1,9 +1,5 @@
 <f:if condition="{model.showElement}">
        <f:format.raw>{model.layout.elementOuterWrap.0}</f:format.raw>
-               <f:if condition="{model.layout.labelPosition} == 'before'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
-
                <f:form.upload
                        class="{model.additionalArguments.class}"
                        dir="{model.additionalArguments.dir}"
@@ -23,9 +19,5 @@
                        errorClass="{model.additionalArguments.errorClass}"
                        additionalAttributes="{model.htmlAttributes}"
                />
-
-               <f:if condition="{model.layout.labelPosition} == 'after'">
-                       <f:format.raw>{model.layout.label}</f:format.raw>
-               </f:if>
        <f:format.raw>{model.layout.elementOuterWrap.1}</f:format.raw>
 </f:if>
\ No newline at end of file