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

checkbox: value for unchecked will be saved now.

parent b92e0a4c
Pipeline #2811 passed with stages
in 2 minutes and 41 seconds
...@@ -2059,7 +2059,6 @@ abstract class AbstractBuildForm { ...@@ -2059,7 +2059,6 @@ abstract class AbstractBuildForm {
if ($formElement[FE_CHECKBOX_CHECKED] === $value) { if ($formElement[FE_CHECKBOX_CHECKED] === $value) {
$attribute .= Support::doAttribute('checked', 'checked'); $attribute .= Support::doAttribute('checked', 'checked');
// $valueJson = true;
$valueJson = $value; $valueJson = $value;
} }
......
...@@ -257,7 +257,7 @@ class FillStoreForm { ...@@ -257,7 +257,7 @@ class FillStoreForm {
switch ($formElement[FE_TYPE]) { switch ($formElement[FE_TYPE]) {
case FE_TYPE_CHECKBOX: case FE_TYPE_CHECKBOX:
// Checkbox Multi: collect values // Checkbox Multi: collect values
$val = $this->collectCheckBoxValues($clientFieldName, $clientValues); $val = $this->collectCheckBoxValues($clientFieldName, $clientValues, $formElement[FE_CHECKBOX_CHECKED] ?? '');
if ($val !== false) { if ($val !== false) {
$clientValues[$clientFieldName] = $val; $clientValues[$clientFieldName] = $val;
} }
...@@ -352,7 +352,7 @@ class FillStoreForm { ...@@ -352,7 +352,7 @@ class FillStoreForm {
* *
* @return string * @return string
*/ */
private function collectCheckBoxValues($clientFieldName, array $clientValues) { private function collectCheckBoxValues($clientFieldName, array $clientValues, $unchecked) {
// Check for Single // Check for Single
// $checkboxKey = HelperFormElement::prependFormElementNameCheckBoxMulti($clientFieldName, '', false); // $checkboxKey = HelperFormElement::prependFormElementNameCheckBoxMulti($clientFieldName, '', false);
...@@ -366,7 +366,7 @@ class FillStoreForm { ...@@ -366,7 +366,7 @@ class FillStoreForm {
return $clientValues[$clientFieldName]; return $clientValues[$clientFieldName];
} }
return false; return $unchecked;
......
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