Commit a6a32708 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #2720. Unnecessary hidden form element removed

parent 80339127
Pipeline #2635 passed with stages
in 2 minutes and 47 seconds
...@@ -2338,9 +2338,10 @@ abstract class AbstractBuildForm { ...@@ -2338,9 +2338,10 @@ abstract class AbstractBuildForm {
if ($formElement[FE_BUTTON_CLASS] == '') { if ($formElement[FE_BUTTON_CLASS] == '') {
$formElement[FE_BUTTON_CLASS] = 'btn-default'; $formElement[FE_BUTTON_CLASS] = 'btn-default';
} }
// BS
$html = $this->constructRadioButton($formElement, $htmlFormElementName, $value, $json, $mode); $html = $this->constructRadioButton($formElement, $htmlFormElementName, $value, $json, $mode);
} else { } else {
// Plain
$html = $this->constructRadioPlain($formElement, $htmlFormElementName, $value, $json, $mode); $html = $this->constructRadioPlain($formElement, $htmlFormElementName, $value, $json, $mode);
} }
...@@ -2399,9 +2400,6 @@ abstract class AbstractBuildForm { ...@@ -2399,9 +2400,6 @@ abstract class AbstractBuildForm {
$attribute .= Support::doAttribute('autofocus', $formElement[FE_AUTOFOCUS]); $attribute .= Support::doAttribute('autofocus', $formElement[FE_AUTOFOCUS]);
} }
$htmlHidden = $this->buildNativeHidden($htmlFormElementName, $value);
$this->store->setVar($htmlFormElementName, $htmlHidden, STORE_ADDITIONAL_FORM_ELEMENTS, false);
$html = ''; $html = '';
for ($ii = 0; $ii < count($itemValue); $ii++) { for ($ii = 0; $ii < count($itemValue); $ii++) {
$classActive = ''; $classActive = '';
...@@ -2465,6 +2463,7 @@ abstract class AbstractBuildForm { ...@@ -2465,6 +2463,7 @@ abstract class AbstractBuildForm {
*/ */
private function constructRadioPlain(array $formElement, $htmlFormElementName, $value, array &$json, $mode = FORM_LOAD) { private function constructRadioPlain(array $formElement, $htmlFormElementName, $value, array &$json, $mode = FORM_LOAD) {
$attributeBase = ''; $attributeBase = '';
$html = '';
if (isset($formElement[FE_BUTTON_CLASS])) { if (isset($formElement[FE_BUTTON_CLASS])) {
return $this->constructRadioButton($formElement, $htmlFormElementName, $value, $json, $mode); return $this->constructRadioButton($formElement, $htmlFormElementName, $value, $json, $mode);
...@@ -2495,9 +2494,6 @@ abstract class AbstractBuildForm { ...@@ -2495,9 +2494,6 @@ abstract class AbstractBuildForm {
$attribute .= Support::doAttribute('autofocus', $formElement[FE_AUTOFOCUS]); $attribute .= Support::doAttribute('autofocus', $formElement[FE_AUTOFOCUS]);
} }
$html = $this->buildNativeHidden($htmlFormElementName, $value);
for ($ii = 0; $ii < count($itemValue); $ii++) { for ($ii = 0; $ii < count($itemValue); $ii++) {
$jj++; $jj++;
......
Markdown is supported
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