Commit 803f472b authored by Carsten  Rose's avatar Carsten Rose
Browse files

B6467: 'element-update' now get's 'pattern=<pattern>|false' on form-update too. Refs #6467

parent 6fa1fff3
Pipeline #1134 passed with stage
in 1 minute and 38 seconds
......@@ -973,9 +973,19 @@ abstract class AbstractBuildForm {
$flagRowUpdate = true;
}
$statusHidden = ($formElement[FE_MODE] == 'hidden');
$pattern = null;
if ( isset($formElement[FE_CHECK_PATTERN]) && $formElement[FE_CHECK_PATTERN] != '') {
$pattern = $statusHidden ? false : $formElement[FE_CHECK_PATTERN];
}
// 'value' update via 'form-update' on the full row: only if there is no other FE in that row
if ($flagRowUpdate) {
$json[API_FORM_UPDATE_VALUE] = $value;
if ($pattern !== null) {
$json['pattern'] = $pattern;
}
}
if (isset($formElement[FE_LABEL])) {
......@@ -997,12 +1007,6 @@ abstract class AbstractBuildForm {
$json[API_ELEMENT_UPDATE][$key][API_ELEMENT_CONTENT] = $value;
}
$statusHidden = ($formElement[FE_MODE] == 'hidden');
$pattern = null;
if ($formElement[FE_CHECK_PATTERN] != '') {
$pattern = $statusHidden ? false : $formElement[FE_CHECK_PATTERN];
}
// Check show/hide: only FE with FE_MODE_SQL given, might change.
if (!empty($formElement[FE_MODE_SQL])) {
$class = is_numeric($formElement[FE_BS_INPUT_COLUMNS]) ? ('col-md-' . $formElement[FE_BS_INPUT_COLUMNS]) : $formElement[FE_BS_INPUT_COLUMNS];
......
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