]> git.joonet.de Git - adminer.git/commitdiff
Auto-focus user-name in login form
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 26 Apr 2010 16:21:28 +0000 (16:21 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Mon, 26 Apr 2010 16:21:28 +0000 (16:21 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1497 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/adminer.inc.php
editor/include/adminer.inc.php

index 4e52aef56b08ae3fffe213b7ddf0c8cf8a038757..2437ee6612c4f1ef51880792bd9d190ba4785781 100644 (file)
@@ -41,9 +41,12 @@ class Adminer {
 <table cellspacing="0">
 <tr><th><?php echo lang('System'); ?><td><?php echo (count($possible_drivers) > 3 ? html_select("driver", $drivers, DRIVER) : "<input type='hidden' name='driver' value='" . key($drivers) . "'>" . reset($drivers)); ?></tr>
 <tr><th><?php echo lang('Server'); ?><td><input name="server" value="<?php echo h(SERVER); ?>">
-<tr><th><?php echo lang('Username'); ?><td><input name="username" value="<?php echo h($_GET["username"]); ?>">
+<tr><th><?php echo lang('Username'); ?><td><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>">
 <tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
 </table>
+<script type="text/javascript">
+document.getElementById('username').focus();
+</script>
 <?php
                echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
                if ($this->permanentLogin()) {
index f6aad529c23b51171898b212cd4b5c6fd41d37b4..d68971df3c49b5c945469e56cbe81db65bda53d4 100644 (file)
@@ -29,9 +29,12 @@ class Adminer {
        function loginForm() {
                ?>
 <table cellspacing="0">
-<tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="driver" value="server"><input type="hidden" name="server" value=""><input name="username" value="<?php echo h($_GET["username"]);  ?>">
+<tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="driver" value="server"><input type="hidden" name="server" value=""><input id="username" name="username" value="<?php echo h($_GET["username"]);  ?>">
 <tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
 </table>
+<script type="text/javascript">
+document.getElementById('username').focus();
+</script>
 <?php
                echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
                if ($this->permanentLogin()) {