[TASK] Improve session timeout dialog 88/43288/5
authorMathias Brodala <mbrodala@pagemachine.de>
Mon, 14 Sep 2015 09:13:58 +0000 (11:13 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 15 Sep 2015 09:01:11 +0000 (11:01 +0200)
This renames the "Abort" action to "Stay logged in" and makes it
the default in the session timeout dialog. Thus one can simply
press the Space/Return key to stay logged in which is the most
likely action in this situation.

This drops the translation label "mess.refresh_login_abort_button"
from locallang_core.xlf which is now unused. Also the label
"mess.refresh_login_confirm_button" is changed to
"mess.refresh_login_logout_button".

Resolves: #69774
Releases: master
Change-Id: I71b797fb61750a293718e144bc76e28199874c38
Reviewed-on: http://review.typo3.org/43288
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Michael Oehlhof <typo3@oehlhof.de>
Tested-by: Michael Oehlhof <typo3@oehlhof.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Resources/Public/JavaScript/LoginRefresh.js
typo3/sysext/lang/locallang_core.xlf

index 53b17ed..2a78829 100644 (file)
@@ -490,8 +490,7 @@ class BackendController implements \TYPO3\CMS\Core\Http\ControllerInterface {
                        'refresh_login_countdown' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.refresh_login_countdown'),
                        'login_about_to_expire' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.login_refresh_about_to_expire'),
                        'login_about_to_expire_title' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.login_about_to_expire_title'),
-                       'refresh_login_abort_button' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.refresh_login_abort_button'),
-                       'refresh_login_confirm_button' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.refresh_login_confirm_button'),
+                       'refresh_login_logout_button' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.refresh_login_logout_button'),
                        'refresh_login_refresh_button' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:mess.refresh_login_refresh_button'),
                        'tabs_closeAll' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:tabs.closeAll'),
                        'tabs_closeOther' => $lang->sL('LLL:EXT:lang/locallang_core.xlf:tabs.closeOther'),
index 36a27db..0712f3f 100644 (file)
@@ -104,7 +104,10 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery', 'bootstrap'], function($) {
                        )
                );
                LoginRefresh.$timeoutModal.find('.modal-footer').append(
-                       $('<button />', {class: 'btn btn-default', 'data-action': 'refreshSession'}).text(TYPO3.LLL.core.refresh_login_abort_button).on('click', function() {
+                       $('<button />', {class: 'btn btn-default', 'data-action': 'logout'}).text(TYPO3.LLL.core.refresh_login_logout_button).on('click', function() {
+                               top.location.href = TYPO3.configuration.siteUrl + LoginRefresh.logoutUrl;
+                       }),
+                       $('<button />', {class: 'btn btn-primary t3js-active', 'data-action': 'refreshSession'}).text(TYPO3.LLL.core.refresh_login_refresh_button).on('click', function() {
                                $.ajax({
                                        url: TYPO3.settings.ajaxUrls['BackendLogin::isTimedOut'],
                                        method: 'GET',
@@ -112,9 +115,6 @@ define('TYPO3/CMS/Backend/LoginRefresh', ['jquery', 'bootstrap'], function($) {
                                                LoginRefresh.hideTimeoutModal();
                                        }
                                });
-                       }),
-                       $('<button />', {class: 'btn btn-primary t3js-active', 'data-action': 'logout'}).text(TYPO3.LLL.core.refresh_login_confirm_button).on('click', function() {
-                               top.location.href = TYPO3.configuration.siteUrl + LoginRefresh.logoutUrl;
                        })
                );
                LoginRefresh.registerDefaultModalEvents(LoginRefresh.$timeoutModal);
index d24eccb..cb6efd7 100644 (file)
@@ -686,10 +686,7 @@ Do you want to refresh it now?</source>
                        <trans-unit id="mess.login_about_to_expire">
                                <source>Your TYPO3 login is about to expire. Please confirm that you want to stay logged in.</source>
                        </trans-unit>
-                       <trans-unit id="mess.refresh_login_abort_button">
-                               <source>Abort</source>
-                       </trans-unit>
-                       <trans-unit id="mess.refresh_login_confirm_button">
+                       <trans-unit id="mess.refresh_login_logout_button">
                                <source>Log me out</source>
                        </trans-unit>
                        <trans-unit id="mess.login_refresh_about_to_expire">