[BUGFIX] Unsplit split buttons in TableController 84/58784/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 29 Oct 2018 21:26:39 +0000 (22:26 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Mon, 29 Oct 2018 21:37:31 +0000 (22:37 +0100)
The controller of the table wizard doesn't use split buttons anymore.

Resolves: #86792
Releases: master
Change-Id: I1d4c1f0d2a6a47dc9d997148fa70f6ea82b058cc
Reviewed-on: https://review.typo3.org/58784
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php

index 3f1f830..f4f21c3 100644 (file)
@@ -354,39 +354,27 @@ class TableController extends AbstractWizardController
             // Close
             $closeButton = $buttonBar->makeLinkButton()
                 ->setHref($this->P['returnUrl'])
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL))
                 ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.closeDoc'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-close', Icon::SIZE_SMALL));
-            $buttonBar->addButton($closeButton);
+                ->setShowLabelText(true);
+            $buttonBar->addButton($closeButton, ButtonBar::BUTTON_POSITION_LEFT, 1);
             // Save
             $saveButton = $buttonBar->makeInputButton()
                 ->setName('_savedok')
                 ->setValue('1')
                 ->setForm('TableController')
                 ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-document-save', Icon::SIZE_SMALL))
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveDoc'));
-            // Save & Close
-            $saveAndCloseButton = $buttonBar->makeInputButton()
-                ->setName('_saveandclosedok')
-                ->setValue('1')
-                ->setForm('TableController')
-                ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveCloseDoc'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon(
-                    'actions-document-save-close',
-                    Icon::SIZE_SMALL
-                ));
-            $splitButtonElement = $buttonBar->makeSplitButton()
-                ->addItem($saveButton)
-                ->addItem($saveAndCloseButton);
-
-            $buttonBar->addButton($splitButtonElement, ButtonBar::BUTTON_POSITION_LEFT, 3);
+                ->setTitle($this->getLanguageService()->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveDoc'))
+                ->setShowLabelText(true);
+            $buttonBar->addButton($saveButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
             // Reload
             $reloadButton = $buttonBar->makeInputButton()
                 ->setName('_refresh')
                 ->setValue('1')
                 ->setForm('TableController')
-                ->setTitle($this->getLanguageService()->getLL('forms_refresh'))
-                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-refresh', Icon::SIZE_SMALL));
-            $buttonBar->addButton($reloadButton);
+                ->setIcon($this->moduleTemplate->getIconFactory()->getIcon('actions-refresh', Icon::SIZE_SMALL))
+                ->setTitle($this->getLanguageService()->getLL('forms_refresh'));
+            $buttonBar->addButton($reloadButton, ButtonBar::BUTTON_POSITION_RIGHT);
         }
     }