Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login, hide driver selection if only one. #115

Closed
wants to merge 1 commit into from

Conversation

cobisimo
Copy link
Contributor

@cobisimo cobisimo commented Dec 7, 2014

Patch for a small problem that I find quite irritated.

@vrana
Copy link
Owner

vrana commented Dec 7, 2014

This is intentional to show what this version of Adminer supports. Also, you couldn't put <input> inside <table>.

@vrana vrana closed this Dec 7, 2014
@cobisimo
Copy link
Contributor Author

cobisimo commented Dec 7, 2014

You are right about <input>, but about this feature I disagree.

Maybe it's easier just to add class to all options, and hide it in css, without losing its functionality. It's now very hard, because you have just few classes on html elements.

This part can be like this:

<table id="login-form">
<tr class="driver"><th><?php echo lang('System'); ?><td><?php echo html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);"); ?>
<tr class="server"><th><?php echo lang('Server'); ?><td><input name="auth[server]" value="<?php echo h(SERVER); ?>" title="hostname[:port]" placeholder="localhost" autocapitalize="off">
<tr class="username"><th><?php echo lang('Username'); ?><td><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
<tr class="password"><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
<tr class="database"><th><?php echo lang('Database'); ?><td><input name="auth[db]" value="<?php echo h($_GET["db"]); ?>" autocapitalize="off">
</table>

and then in css we can hide like this:

#login-form .driver {
display: none;
}

@djmattyg007
Copy link
Contributor

Looks like similar functionality has now been implemented on the master branch: bad3c6b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants