From eeae8bec2159e2be2b25cf704fa25d1ac1d33c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 21 Jul 2010 09:21:58 +0200 Subject: [PATCH] Get rid of inline javascript in login form. --- js/functions.js | 7 +++++++ libraries/auth/cookie.auth.lib.php | 30 +++++++----------------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/js/functions.js b/js/functions.js index e5d836322..b5995f0f5 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1726,5 +1726,12 @@ $(document).ready(function(){ return false; }); $('#sqlquery').focus(); + if ($('#input_username')) { + if ($('#input_username').val() == '') { + $('#input_username').focus(); + } else { + $('#input_password').focus(); + } + } }); diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php index b40f7a2ed..a9644557c 100644 --- a/libraries/auth/cookie.auth.lib.php +++ b/libraries/auth/cookie.auth.lib.php @@ -172,14 +172,14 @@ function PMA_auth() ?> - + - +?> + @@ -312,22 +312,6 @@ if (top != self) { } ?> -