]> git.joonet.de Git - adminer.git/commitdiff
Auto focus new table name
authorJakub Vrana <jakub@vrana.cz>
Tue, 7 Dec 2010 23:42:22 +0000 (00:42 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 7 Dec 2010 23:42:22 +0000 (00:42 +0100)
adminer/create.inc.php

index 7171c8648581912ee2837ac13bc7e83a46d36e7c..f03cdd5cfc1d86a283ad8cd666a07d97798bdf6f 100644 (file)
@@ -149,6 +149,7 @@ foreach ($engines as $engine) {
 <form action="" method="post" id="form">
 <p>
 <?php echo lang('Table name'); ?>: <input name="name" maxlength="64" value="<?php echo h($row["name"]); ?>">
+<?php if ($TABLE == "" && !$_POST) { ?><script type='text/javascript'>document.getElementById('form')['name'].focus();</script><?php } ?>
 <?php echo ($engines ? html_select("Engine", array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) : ""); ?>
  <?php echo ($collations && !ereg("sqlite|mssql", $jush) ? html_select("Collation", array("" => "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?>
  <input type="submit" value="<?php echo lang('Save'); ?>">