[BUGFIX] Remove unused `fieldChangeFunc` in GroupElement 10/58910/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sun, 18 Nov 2018 19:47:01 +0000 (20:47 +0100)
committerBenni Mack <benni@typo3.org>
Mon, 19 Nov 2018 12:48:20 +0000 (13:48 +0100)
The class GroupElement defines a `fieldChangeFunc` which is unused in
this context. Since this never caused an issue, it's assumed to be save
to remove the change handler.

This allows further cleanup in the FormEngine JavaScript land, e.g.
deprecating `setFormValueManipulate()`.

Resolves: #86948
Releases: master
Change-Id: I51f8c0c6bf3cd383ba2e12e29f329ceb979a9799
Reviewed-on: https://review.typo3.org/58910
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Form/Element/GroupElement.php

index e6850a1..3efb5c1 100644 (file)
@@ -265,13 +265,6 @@ class GroupElement extends AbstractFormElement
             $showDeleteControl = false;
         }
 
-        if ($maxItems === 1) {
-            // If maxItems==1 then automatically replace the current item in list
-            $parameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'] =
-                'setFormValueManipulate(' . GeneralUtility::quoteJSvalue($elementName) . ', \'Remove\');'
-                . $parameterArray['fieldChangeFunc']['TBE_EDITOR_fieldChanged'];
-        }
-
         // Check against inline uniqueness - Create some onclick js for delete control and element browser
         // to override record selection in some FAL scenarios - See 'appearance' docs of group element
         $inlineStackProcessor = GeneralUtility::makeInstance(InlineStackProcessor::class);