Commit b35e0f55 authored by Carsten  Rose's avatar Carsten Rose

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 {
if ($formElement[FE_CHECKBOX_CHECKED] === $value) {
$attribute .= Support::doAttribute('checked', 'checked');
// $valueJson = true;
$valueJson = $value;
}
......
......@@ -257,7 +257,7 @@ class FillStoreForm {
switch ($formElement[FE_TYPE]) {
case FE_TYPE_CHECKBOX:
// Checkbox Multi: collect values
$val = $this->collectCheckBoxValues($clientFieldName, $clientValues);
$val = $this->collectCheckBoxValues($clientFieldName, $clientValues, $formElement[FE_CHECKBOX_CHECKED] ?? '');
if ($val !== false) {
$clientValues[$clientFieldName] = $val;
}
......@@ -352,7 +352,7 @@ class FillStoreForm {
*
* @return string
*/
private function collectCheckBoxValues($clientFieldName, array $clientValues) {
private function collectCheckBoxValues($clientFieldName, array $clientValues, $unchecked) {
// Check for Single
// $checkboxKey = HelperFormElement::prependFormElementNameCheckBoxMulti($clientFieldName, '', false);
......@@ -366,7 +366,7 @@ class FillStoreForm {
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