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

B5077 Dynamic Update & FE.type=required: Client now behaves good - server is still buggy.

parent 3adaca93
......@@ -886,6 +886,8 @@ abstract class AbstractBuildForm {
* @param array $formElement
*
* @return array
* @throws CodeException
* @throws UserFormException
*/
private function getFormElementForJson($htmlFormElementName, $value, array $formElement) {
......@@ -928,6 +930,8 @@ abstract class AbstractBuildForm {
$class = 'col-md-' . $formElement[FE_BS_INPUT_COLUMNS] . ' ';
$class .= ($formElement[FE_MODE] == FE_MODE_HIDDEN) ? 'hidden' : '';
$json[API_ELEMENT_UPDATE][$key][API_ELEMENT_ATTRIBUTE]['class'] = $class;
$json[API_ELEMENT_UPDATE][$key][API_ELEMENT_ATTRIBUTE]['required'] = $formElement[FE_MODE] == 'required';
$json[API_ELEMENT_UPDATE][$key][API_ELEMENT_ATTRIBUTE]['hidden'] = $formElement[FE_MODE] == 'hidden';
}
// #3647
......@@ -937,6 +941,8 @@ abstract class AbstractBuildForm {
//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;
$json[API_ELEMENT_UPDATE][$formElement[FE_HTML_ID]][API_ELEMENT_ATTRIBUTE]['required'] = $formElement[FE_MODE] == 'required';
$json[API_ELEMENT_UPDATE][$formElement[FE_HTML_ID]][API_ELEMENT_ATTRIBUTE]['hidden'] = $formElement[FE_MODE] == 'hidden';
}
}
......
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