[TASK] UX: Streamline Page Translation selector in Page Module 01/55001/2
authorBenni Mack <benni@typo3.org>
Sat, 9 Dec 2017 17:38:32 +0000 (18:38 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Sat, 9 Dec 2017 18:30:49 +0000 (19:30 +0100)
The page translation selector in the page module has the label outside
of the dropdown, where as the List module has the label as the first option.

This patch puts the label inside the first option of the dropdown selector
in the page module.

This way, the selector box is aligned to the left, and thus, does not look
like it's placed "somewhere" in the HTML code.

Resolves: #83271
Releases: master
Change-Id: Idbedf2f6cfb9056e0c89a69029f31b4b47673a02
Reviewed-on: https://review.typo3.org/55001
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/backend/Classes/View/PageLayoutView.php

index e3bc6ab..a0999d5 100644 (file)
@@ -2541,7 +2541,7 @@ class PageLayoutView implements LoggerAwareInterface
             }
             // If any languages are left, make selector:
             if (!empty($availableTranslations)) {
-                $output = '<option value=""></option>';
+                $output = '<option value="">' . htmlspecialchars($this->getLanguageService()->getLL('new_language')) . '</option>';
                 foreach ($availableTranslations as $languageUid => $languageTitle) {
                     // Build localize command URL to DataHandler (tce_db)
                     // which redirects to FormEngine (record_edit)
@@ -2562,9 +2562,6 @@ class PageLayoutView implements LoggerAwareInterface
 
                 return '<div class="form-inline form-inline-spaced">'
                     . '<div class="form-group">'
-                    . '<label for="createNewLanguage">'
-                    . htmlspecialchars($this->getLanguageService()->getLL('new_language'))
-                    . '</label>'
                     . '<select class="form-control input-sm" name="createNewLanguage" onchange="window.location.href=this.options[this.selectedIndex].value">'
                     . $output
                     . '</select></div></div>';