From 874b9ee746377b4ad1e0aaf970f6a25698a48bb7 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Sun, 16 Feb 2025 18:23:07 +0100 Subject: [PATCH] Use autofocus HTML attribute --- adminer/create.inc.php | 3 +-- adminer/database.inc.php | 5 ++--- adminer/include/adminer.inc.php | 2 +- adminer/include/driver.inc.php | 6 +++--- adminer/scheme.inc.php | 3 +-- changes.txt | 1 + editor/include/adminer.inc.php | 2 +- 7 files changed, 10 insertions(+), 12 deletions(-) diff --git a/adminer/create.inc.php b/adminer/create.inc.php index 905ff390..92e375cb 100644 --- a/adminer/create.inc.php +++ b/adminer/create.inc.php @@ -181,8 +181,7 @@ foreach ($engines as $engine) {

-: " autocapitalize="off"> - +: data-maxlength="64" value="" autocapitalize="off"> " . optionlist(array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . "" . on_help("getTarget(event).value", 1) . script("qsl('select').onchange = helpClose;") : ""); ?> "(" . lang('collation') . ")") + $collations, $row["Collation"]) : ""); ?> diff --git a/adminer/database.inc.php b/adminer/database.inc.php index bc5e4dbf..355dd56e 100644 --- a/adminer/database.inc.php +++ b/adminer/database.inc.php @@ -59,14 +59,13 @@ if ($_POST) {

' . h($name) . '
' - : '' + ? '
' + : '' ) . "\n" . ($collations ? html_select("collation", array("" => "(" . lang('collation') . ")") + $collations, $row["collation"]) . doc_link(array( 'sql' => "charset-charsets.html", 'mariadb' => "supported-character-sets-and-collations/", 'mssql' => "ms187963.aspx", )) : ""); -echo script("focus(qs('#name'));"); ?> \n"; echo $this->loginFormField('driver', '' . lang('System') . '', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n"); echo $this->loginFormField('server', '' . lang('Server') . '', '' . "\n"); - echo $this->loginFormField('username', '' . lang('Username') . '', '' . script("focus(qs('#username')); qs('#username').form['auth[driver]'].onchange();")); + echo $this->loginFormField('username', '' . lang('Username') . '', '' . script("qs('#username').form['auth[driver]'].onchange();")); echo $this->loginFormField('password', '' . lang('Password') . '', '' . "\n"); echo $this->loginFormField('db', '' . lang('Database') . '', '' . "\n"); echo "\n"; diff --git a/adminer/include/driver.inc.php b/adminer/include/driver.inc.php index 8bcb242e..d849c758 100644 --- a/adminer/include/driver.inc.php +++ b/adminer/include/driver.inc.php @@ -152,9 +152,9 @@ function get_driver($id) { } /** Convert operator so it can be used in search - * @param string $operator - * @return string - */ + * @param string $operator + * @return string + */ function convertOperator($operator) { return $operator; } diff --git a/adminer/scheme.inc.php b/adminer/scheme.inc.php index b1774541..0795b2a8 100644 --- a/adminer/scheme.inc.php +++ b/adminer/scheme.inc.php @@ -26,8 +26,7 @@ if (!$row) { ?> -

" autocapitalize="off"> - +

" autocapitalize="off"> \n"; - echo $this->loginFormField('username', '' . lang('Username') . '', '' . script("focus(qs('#username'));")); + echo $this->loginFormField('username', '' . lang('Username') . '', ''); echo $this->loginFormField('password', '' . lang('Password') . '', '' . "\n"); echo "\n"; echo "

\n";