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

3612 / Konflikt typeAheadLdap mit dynamic modesql: code cleanup.

parent 1c63c477
......@@ -505,7 +505,7 @@ abstract class AbstractBuildForm {
} else {
$json[] = $jsonElement;
}
$json = $this->elementUpdateAttrClassOnRow($json, $formElement);
// $json = $this->elementUpdateAttrClassOnRow($json, $formElement);
}
}
......@@ -749,6 +749,18 @@ abstract class AbstractBuildForm {
$json[API_ELEMENT_UPDATE][$key][API_ELEMENT_CONTENT] = $formElement[FE_NOTE];
}
// Show/ Hide the complete FormElement Row.
if (isset($formElement[FE_HTML_ID])) { // HIDDEN_SIP comes without a real existing FE structure.
// Activate 'show' or 'hidden' on the current FormElement via JSON 'API_ELEMENT_UPDATE'
$class = $this->wrap[WRAP_SETUP_ELEMENT][WRAP_SETUP_CLASS];
if ($formElement[FE_MODE] == 'hidden') {
$class .= ' hidden';
}
$key = $formElement[FE_HTML_ID] . HTML_ID_EXTENSION_ROW;
$json[API_ELEMENT_UPDATE][$key][API_ELEMENT_ATTRIBUTE]['class'] = $class;
}
return $json;
}
......@@ -761,9 +773,9 @@ abstract class AbstractBuildForm {
*/
private function getJsonFeMode($feMode) {
$this->getFeMode($feMode, $hidden, $disabled, $required);
$this->getFeMode($feMode, $dummy, $disabled, $required);
return [API_JSON_HIDDEN => $hidden === 'yes', API_JSON_DISABLED => $disabled === 'yes', API_JSON_REQUIRED => $required === 'yes'];
return [API_JSON_DISABLED => $disabled === 'yes', API_JSON_REQUIRED => $required === 'yes'];
}
/**
......
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