Commit 3f7d0b5b authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4456 / formModeGlobal=requiredOff - Switches FormElement.mode=required to...

#4456 / formModeGlobal=requiredOff - Switches FormElement.mode=required to 'show' for all FE of the current Form.
parent a879fb54
......@@ -699,7 +699,7 @@ class Support {
self::setIfNotSet($formElement, FE_SUBRECORD_TABLE_CLASS, 'table table-hover');
if (count($formSpec) > 0) {
if (isset($formSpec[F_BS_LABEL_COLUMNS])) {
self::setIfNotSet($formElement, F_BS_LABEL_COLUMNS, $formSpec[F_BS_LABEL_COLUMNS], '');
self::setIfNotSet($formElement, F_BS_INPUT_COLUMNS, $formSpec[F_BS_INPUT_COLUMNS], '');
self::setIfNotSet($formElement, F_BS_NOTE_COLUMNS, $formSpec[F_BS_NOTE_COLUMNS], '');
......
......@@ -57,6 +57,7 @@ class FillStoreForm {
* @throws UserFormException
*/
private function loadFormElementsBasedOnSIP() {
$formName = $this->store->getVar(SIP_FORM, STORE_SIP);
// Preparation for Log, Debug
......@@ -137,6 +138,7 @@ class FillStoreForm {
$newValues = array();
$clientValues = $this->store->getStore(STORE_CLIENT);
$formModeGlobal = $this->store->getVar(F_MODE_GLOBAL, STORE_SIP . STORE_EMPTY);
// If called through 'api/...': get STORE_TYPO3 via SIP parameter.
if (isset($clientValues[CLIENT_TYPO3VARS])) {
......@@ -184,7 +186,7 @@ class FillStoreForm {
$clientFieldName = HelperFormElement::buildFormElementName($formElement, $fakeRecordId);
// Some Defaults
$formElement = Support::setFeDefaults($formElement);
$formElement = Support::setFeDefaults($formElement, [F_MODE => $formModeGlobal]);
if ($formElement[FE_TYPE] === FE_TYPE_EXTRA) {
// Extra elements will be transferred by SIP
......
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