[BUGFIX] Enable localizationStateSelector for selectTreeElement 87/56487/2
authorTorben Hansen <derhansen@gmail.com>
Fri, 30 Mar 2018 05:33:20 +0000 (07:33 +0200)
committerSusanne Moog <susanne.moog@typo3.org>
Thu, 10 May 2018 13:42:39 +0000 (15:42 +0200)
This patch enables the localizationStateSelector for the
selectTreeElement, so an editor can select the localization state
when allowLanguageSynchronization is enabled for the element.

Resolves: #84564
Releases: master, 8.7
Change-Id: I7b315bc19b165d7c9603c0a35ee11b03b7f77c4f
Reviewed-on: https://review.typo3.org/56487
Tested-by: TYPO3com <no-reply@typo3.com>
Tested-by: Sybille Peters <sypets@gmx.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Cristian Buja <cristian.buja@intera.it>
Tested-by: Cristian Buja <cristian.buja@intera.it>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/Form/Element/SelectTreeElement.php

index a830ec5..903af7d 100644 (file)
@@ -22,6 +22,15 @@ namespace TYPO3\CMS\Backend\Form\Element;
 class SelectTreeElement extends AbstractFormElement
 {
     /**
+     * @var array Default wizards
+     */
+    protected $defaultFieldWizard = [
+        'localizationStateSelector' => [
+            'renderType' => 'localizationStateSelector',
+        ],
+    ];
+
+    /**
      * Default number of tree nodes to show (determines tree height)
      * when no ['config']['size'] is set
      *
@@ -145,6 +154,10 @@ class SelectTreeElement extends AbstractFormElement
         $html[] =   '</div>';
         $html[] = '</div>';
 
+        $fieldWizardResult = $this->renderFieldWizard();
+        $fieldWizardHtml = $fieldWizardResult['html'];
+        $html[] = $fieldWizardHtml;
+
         $resultArray['html'] = implode(LF, $html);
 
         // add necessary labels for tree header