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

Bug #5016 Loose checkbox value on save - Dirty workaround - better solution necessary.

parent b1e8b011
......@@ -30,10 +30,10 @@ require_once(__DIR__ . '/../qfq/QuickFormQuery.php');
*
* Description:
*
* Save successfull. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message
* Save successful. Button 'close', 'new'. Form.forward: 'auto'. Client logic decide to redirect or not. Show message
* if no redirect. status = 'success' message = <message> redirect = 'client'
*
* Save successfull. Button 'close': Form.forward: 'page'. Client redirect to url.
* Save successful. Button 'close': Form.forward: 'page'. Client redirect to url.
* status = 'success'
* message = <message>
* redirect = 'url'
......
......@@ -904,7 +904,8 @@ abstract class AbstractBuildForm {
// if (!$flagRowUpdate) {
// #4771 - temporary workaround: SELECT in 'multi FE row' won't updated after 'save' or with dynamic update.
if ($formElement[FE_TYPE] != FE_TYPE_SELECT && $formElement[FE_TYPE] != FE_TYPE_UPLOAD) {
//TODO #5016 - exception for FE_TYPE_CHECKBOX should be removed ASAP
if ($formElement[FE_TYPE] != FE_TYPE_SELECT && $formElement[FE_TYPE] != FE_TYPE_UPLOAD && $formElement[FE_TYPE] != FE_TYPE_CHECKBOX) {
$json[API_ELEMENT_UPDATE][$formElement[FE_HTML_ID]][API_ELEMENT_ATTRIBUTE]['value'] = $value;
}
}
......@@ -1796,7 +1797,8 @@ abstract class AbstractBuildForm {
if ($formElement[FE_CHECKBOX_CHECKED] === $value) {
$attribute .= Support::doAttribute('checked', 'checked');
$valueJson = true;
// $valueJson = true;
$valueJson = $value;
}
$attribute .= $this->getAttributeList($formElement, ['autofocus']);
......
Supports Markdown
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