[BUGFIX] "form field wizard" in flexform not saved 41/43741/2
authorFrank Nägler <frank.naegler@typo3.org>
Fri, 2 Oct 2015 12:51:35 +0000 (14:51 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 2 Oct 2015 13:27:30 +0000 (15:27 +0200)
This patch fix a bug for wizards in flex forms.

Resolves: #69047
Releases: master
Change-Id: I2bf8f79729c2d31166c77a1a85b3e77cf03828a0
Reviewed-on: http://review.typo3.org/43741
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Form/Container/FlexFormElementContainer.php

index 6a9ee06..6cbbb2b 100644 (file)
@@ -104,7 +104,13 @@ class FlexFormElementContainer extends AbstractContainer {
                                        $fakeParameterArray['fieldChangeFunc']['alert'] = $alertMsgOnChange;
                                }
 
+                               $originalFieldName = $parameterArray['itemFormElName'];
                                $fakeParameterArray['itemFormElName'] = $parameterArray['itemFormElName'] . $flexFormFormPrefix . '[' . $flexFormFieldName . '][vDEF]';
+                               if ($fakeParameterArray['itemFormElName'] !== $originalFieldName) {
+                                       if (!empty($fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'])) {
+                                               $fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] = str_replace($originalFieldName, $fakeParameterArray['itemFormElName'], $fakeParameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged']);
+                                       }
+                               }
                                $fakeParameterArray['itemFormElID'] = $fakeParameterArray['itemFormElName'];
                                if (isset($flexFormRowData[$flexFormFieldName]['vDEF'])) {
                                        $fakeParameterArray['itemFormElValue'] = $flexFormRowData[$flexFormFieldName]['vDEF'];