diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index ba332f91..56345db8 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -119,11 +119,11 @@ class Adminer { function loginForm() { global $drivers; echo "
' . lang('System') . ' | ' . html_select("auth[driver]", $drivers, DRIVER) . "\n"); - echo $this->loginFormField('server', ' |
---|---|
' . lang('Server') . ' | ' . "\n"); - echo $this->loginFormField('username', ' |
' . lang('Username') . ' | ' . script("focus(qs('#username'));")); - echo $this->loginFormField('password', ' |
' . lang('Password') . ' | ' . "\n"); - echo $this->loginFormField('db', ' |
' . lang('Database') . ' | ' . "\n"); + echo $this->loginFormField('driver', ' |
' . lang('System') . ' | ', html_select("auth[driver]", $drivers, DRIVER) . "\n"); + echo $this->loginFormField('server', ' |
' . lang('Server') . ' | ', '' . "\n"); + echo $this->loginFormField('username', ' |
' . lang('Username') . ' | ', '' . script("focus(qs('#username'));")); + echo $this->loginFormField('password', ' |
' . lang('Password') . ' | ', '' . "\n"); + echo $this->loginFormField('db', ' |
' . lang('Database') . ' | ', '' . "\n"); echo " |
\n"; echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n"; @@ -132,10 +132,11 @@ class Adminer { /** Get login form field * @param string * @param string HTML + * @param string HTML * @return string */ - function loginFormField($name, $default) { - return $default; + function loginFormField($name, $heading, $value) { + return $heading . $value; } /** Authorize the user diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 9e374130..316c8635 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -72,15 +72,15 @@ class Adminer { function loginForm() { echo "
' . lang('Username') . ' | ' . script("focus(qs('#username'));")); - echo $this->loginFormField('password', ' |
---|---|
' . lang('Password') . ' | ' . "\n"); + echo $this->loginFormField('username', ' |
' . lang('Username') . ' | ', '' . script("focus(qs('#username'));")); + echo $this->loginFormField('password', ' |
' . lang('Password') . ' | ', '' . "\n"); echo " |
\n"; echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n"; } - function loginFormField($name, $default) { - return $default; + function loginFormField($name, $heading, $value) { + return $heading . $value; } function login($login, $password) { diff --git a/plugins/login-otp.php b/plugins/login-otp.php index 4beddc08..c6015f4b 100644 --- a/plugins/login-otp.php +++ b/plugins/login-otp.php @@ -21,9 +21,9 @@ class AdminerLoginOtp { } } - function loginFormField($name, $default) { + function loginFormField($name, $heading, $value) { if ($name == 'password') { - return $default + return $heading . $value . "
- | |
"> - | |
- |
-" . optionlist(array_keys($this->servers), SERVER) . "\n"; + } } } diff --git a/plugins/plugin.php b/plugins/plugin.php index 5a5af671..7e3c8dca 100644 --- a/plugins/plugin.php +++ b/plugins/plugin.php @@ -160,7 +160,7 @@ class AdminerPlugin extends Adminer { return $this->_applyPlugin(__FUNCTION__, $args); } - function loginFormField($name, $default) { + function loginFormField($name, $heading, $value) { $args = func_get_args(); return $this->_applyPlugin(__FUNCTION__, $args); }