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

#3547 / FE of type 'note' causes writing of empty fields.

During expanding of templateGroups, existing FE with no meaning for save (like note, subrecord, ...) has been created, filled with empty values and saved. Fixed for FEs with type 'subrecord' and 'note' - needs more investigation to check for further sideeffects.
parent 2bf035a9
...@@ -703,6 +703,9 @@ const FE_HTML_ID = 'htmlId'; // Will be dynamically computed during runtime. ...@@ -703,6 +703,9 @@ const FE_HTML_ID = 'htmlId'; // Will be dynamically computed during runtime.
// FormElement Types // FormElement Types
const FE_TYPE_UPLOAD = 'upload'; const FE_TYPE_UPLOAD = 'upload';
const FE_TYPE_EXTRA = 'extra'; const FE_TYPE_EXTRA = 'extra';
const FE_TYPE_SUBRECORD = 'subrecord';
const FE_TYPE_NOTE = 'note';
const FE_TYPE_SENDMAIL = 'sendMail'; const FE_TYPE_SENDMAIL = 'sendMail';
const FE_TYPE_BEFORE_LOAD = 'beforeLoad'; const FE_TYPE_BEFORE_LOAD = 'beforeLoad';
const FE_TYPE_BEFORE_SAVE = 'beforeSave'; const FE_TYPE_BEFORE_SAVE = 'beforeSave';
......
...@@ -81,8 +81,17 @@ class Save { ...@@ -81,8 +81,17 @@ class Save {
foreach ($this->feSpecNative as $formElement) { foreach ($this->feSpecNative as $formElement) {
switch ($formElement[FE_TYPE]) {
// case FE_TYPE_EXTRA:
case FE_TYPE_NOTE:
case FE_TYPE_SUBRECORD:
continue 2;
default:
break;
}
$feName = $formElement[FE_NAME]; $feName = $formElement[FE_NAME];
if (!isset($formValues[$feName])) { if (!isset($formValues[$feName])) {
$formValues[$feName] = $formElement[FE_VALUE]; $formValues[$feName] = $formElement[FE_VALUE];
} }
} }
......
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