Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Hide credentials for SQLite

  • Loading branch information...
commit 1d4745407919b52f1e794a135e31510faffa0b8e 1 parent 9e8ab1d
Jakub Vrána authored
6 adminer/include/adminer.inc.php
@@ -47,13 +47,15 @@ function loginForm() {
47 47 global $drivers;
48 48 ?>
49 49 <table cellspacing="0">
50   -<tr><th><?php echo lang('System'); ?><td><?php echo html_select("driver", $drivers, DRIVER); ?>
  50 +<tr><th><?php echo lang('System'); ?><td><?php echo html_select("driver", $drivers, DRIVER, "loginDriver(this);"); ?>
51 51 <tr><th><?php echo lang('Server'); ?><td><input name="server" value="<?php echo h(SERVER); ?>">
52 52 <tr><th><?php echo lang('Username'); ?><td><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>">
53 53 <tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
54 54 </table>
55 55 <script type="text/javascript">
56   -document.getElementById('username').focus();
  56 +var username = document.getElementById('username');
  57 +username.focus();
  58 +username.form['driver'].onchange();
57 59 </script>
58 60 <?php
59 61 echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
7 adminer/static/editing.js
@@ -58,6 +58,13 @@ function typePassword(el, disable) {
58 58 }
59 59 }
60 60
  61 +function loginDriver(driver) {
  62 + var trs = driver.parentNode.parentNode.parentNode.rows;
  63 + for (var i=1; i < trs.length; i++) {
  64 + trs[i].className = (/sqlite/.test(driver.value) ? 'hidden' : '');
  65 + }
  66 +}
  67 +
61 68
62 69
63 70 var added = '.', rowCount;

0 comments on commit 1d47454

Please sign in to comment.
Something went wrong with that request. Please try again.