Permalink
Browse files

Focus first field with insert (bug #3126501)

  • Loading branch information...
1 parent e26b186 commit ceef6bc6d3f5932cc5114c39559e437105f90262 @vrana committed Jan 31, 2011
Showing with 8 additions and 4 deletions.
  1. +5 −4 adminer/edit.inc.php
  2. +3 −0 changes.txt
@@ -64,7 +64,7 @@
}
?>
-<form action="" method="post" enctype="multipart/form-data">
+<form action="" method="post" enctype="multipart/form-data" id="form">
<?php
if ($fields) {
echo "<table cellspacing='0' onkeydown='return editingKeydown(event);'>\n";
@@ -103,8 +103,9 @@
echo '<input type="submit" name="insert" value="' . ($update ? lang('Save and continue edit') : lang('Save and insert next')) . "\">\n";
}
}
-if ($update) {
- echo "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n";
-}
+echo ($update
+ ? "<input type='submit' name='delete' value='" . lang('Delete') . "' onclick=\"return confirm('" . lang('Are you sure?') . "');\">\n"
+ : "<script type='text/javascript'>document.getElementById('form').elements[0].focus();</script>\n"
+);
?>
</form>
View
@@ -2,13 +2,16 @@ Adminer 3.2.0-dev:
Get long texts and slow information by AJAX
All links and some forms by AJAX in browsers with support for history.pushState
Ability to search by expression in select
+Export SQL command result (bug #3116854)
+Focus first field with insert (bug #3126501)
Permanent link in schema
Display total time in show only errors mode in SQL command
History: edit all
MS SQL: auto primary and foreign key
SQLite: display 0
Create table default data type: int
Focus upper/lower fields by Ctrl+Up/Ctrl+Down
+Hide credentials for SQLite
Homepage customization
Use IN for search in numeric fields (Editor)
Use password input for _md5 and _sha1 fields (Editor)

0 comments on commit ceef6bc

Please sign in to comment.