diff --git a/js/ajax.js b/js/ajax.js index 2f9167a408..9c7e59a846 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -366,9 +366,12 @@ var AJAX = { AJAX.xhr = null; return; } else if(typeof data.logged_in !== 'undefined' && data.logged_in == 1) { - if($("#modalOverlay")) { + if($("#modalOverlay").length) { $("#modalOverlay").remove(); } + if(typeof data.new_token !== 'undefined') { + $("input[name=token]").val(data.new_token); + } } $('html, body').animate({ scrollTop: 0 }, 'fast'); diff --git a/js/functions.js b/js/functions.js index 87e30ffd87..2e6c9aa9a8 100644 --- a/js/functions.js +++ b/js/functions.js @@ -986,9 +986,9 @@ AJAX.registerOnload('functions.js', function () { } else { $('body').append(data.error); - } - if($("#input_username").length) { - $("#input_username").focus(); + $(".ui-dialog").each(function(i) { + $("#" + $(this).attr("aria-describedby")).dialog("close"); + }); } _idleSecondsCounter = 0; } diff --git a/libraries/classes/Plugins/Auth/AuthenticationCookie.php b/libraries/classes/Plugins/Auth/AuthenticationCookie.php index ffaa0c15a1..c8bad4468e 100644 --- a/libraries/classes/Plugins/Auth/AuthenticationCookie.php +++ b/libraries/classes/Plugins/Auth/AuthenticationCookie.php @@ -524,6 +524,10 @@ class AuthenticationCookie extends AuthenticationPlugin 'success', 1 ); + $response->addJSON( + 'new_token', + $_SESSION[' PMA_token '] + ); if($user_changed) { $response->addJSON( 'user_changed', diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php index 49747c7b5b..aa117b7039 100644 --- a/libraries/classes/Util.php +++ b/libraries/classes/Util.php @@ -1879,6 +1879,7 @@ class Util . self::showDocu('faq', 'faqmissingparameters', true) . '[br]'; $found_error = true; + var_dump($GLOBALS); } } if ($found_error) { diff --git a/libraries/config.default.php b/libraries/config.default.php index 9b06e07a16..ed8a4e307c 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -789,7 +789,7 @@ $cfg['LoginCookieRecall'] = true; * * @global integer $cfg['LoginCookieValidity'] */ -$cfg['LoginCookieValidity'] = 1440; +$cfg['LoginCookieValidity'] = 10; /** * how long login cookie should be stored (in seconds) diff --git a/themes/original/css/common.css.php b/themes/original/css/common.css.php index 3d37fcd797..f7d656c63e 100644 --- a/themes/original/css/common.css.php +++ b/themes/original/css/common.css.php @@ -621,15 +621,24 @@ body#loginform div.container { margin: 0 auto; } -div.container.overlay { +div.container.modal_form { + margin: 0 auto; + width: 30em; text-align: center; - position: fixed; - top: 10%; - left: 40%; background: #fff; z-index: 999; } +div#modalOverlay { + position: fixed; + top: 0; + left: 0; + height: 100%; + width: 100%; + background: #fff; + z-index: 900; +} + form.login label { float: ; width: 10em; diff --git a/themes/pmahomme/css/common.css.php b/themes/pmahomme/css/common.css.php index fe656dff49..0171ca2371 100644 --- a/themes/pmahomme/css/common.css.php +++ b/themes/pmahomme/css/common.css.php @@ -909,6 +909,10 @@ div.container.modal_form { z-index: 999; } +#input_username { + z-index: 999; +} + div#modalOverlay { position: fixed; top: 0;