From f3e7027d1ba4b875dc32a8b11db376614f9aab0e Mon Sep 17 00:00:00 2001
From: Benni Mack <benni@typo3.org>
Date: Sat, 9 Dec 2017 18:38:32 +0100
Subject: [PATCH] [TASK] UX: Streamline Page Translation selector in Page
 Module

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 | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/typo3/sysext/backend/Classes/View/PageLayoutView.php b/typo3/sysext/backend/Classes/View/PageLayoutView.php
index e3bc6ab78724..a0999d551d50 100644
--- a/typo3/sysext/backend/Classes/View/PageLayoutView.php
+++ b/typo3/sysext/backend/Classes/View/PageLayoutView.php
@@ -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>';
-- 
GitLab