From a6a32708274fdc6f6dd60cba69a6545918317015 Mon Sep 17 00:00:00 2001 From: Carsten Rose <carsten.rose@math.uzh.ch> Date: Wed, 6 Nov 2019 23:28:45 +0100 Subject: [PATCH] Fixes #2720. Unnecessary hidden form element removed --- extension/Classes/Core/AbstractBuildForm.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/extension/Classes/Core/AbstractBuildForm.php b/extension/Classes/Core/AbstractBuildForm.php index a17ce581b..dcac890c7 100644 --- a/extension/Classes/Core/AbstractBuildForm.php +++ b/extension/Classes/Core/AbstractBuildForm.php @@ -2338,9 +2338,10 @@ abstract class AbstractBuildForm { if ($formElement[FE_BUTTON_CLASS] == '') { $formElement[FE_BUTTON_CLASS] = 'btn-default'; } - + // BS $html = $this->constructRadioButton($formElement, $htmlFormElementName, $value, $json, $mode); } else { + // Plain $html = $this->constructRadioPlain($formElement, $htmlFormElementName, $value, $json, $mode); } @@ -2399,9 +2400,6 @@ abstract class AbstractBuildForm { $attribute .= Support::doAttribute('autofocus', $formElement[FE_AUTOFOCUS]); } - $htmlHidden = $this->buildNativeHidden($htmlFormElementName, $value); - $this->store->setVar($htmlFormElementName, $htmlHidden, STORE_ADDITIONAL_FORM_ELEMENTS, false); - $html = ''; for ($ii = 0; $ii < count($itemValue); $ii++) { $classActive = ''; @@ -2465,6 +2463,7 @@ abstract class AbstractBuildForm { */ private function constructRadioPlain(array $formElement, $htmlFormElementName, $value, array &$json, $mode = FORM_LOAD) { $attributeBase = ''; + $html = ''; if (isset($formElement[FE_BUTTON_CLASS])) { return $this->constructRadioButton($formElement, $htmlFormElementName, $value, $json, $mode); @@ -2495,9 +2494,6 @@ abstract class AbstractBuildForm { $attribute .= Support::doAttribute('autofocus', $formElement[FE_AUTOFOCUS]); } - - $html = $this->buildNativeHidden($htmlFormElementName, $value); - for ($ii = 0; $ii < count($itemValue); $ii++) { $jj++; -- GitLab