Hide credentials for SQLite
This commit is contained in:
parent
9e8ab1df31
commit
1d47454079
2 changed files with 11 additions and 2 deletions
|
@ -47,13 +47,15 @@ class Adminer {
|
|||
global $drivers;
|
||||
?>
|
||||
<table cellspacing="0">
|
||||
<tr><th><?php echo lang('System'); ?><td><?php echo html_select("driver", $drivers, DRIVER); ?>
|
||||
<tr><th><?php echo lang('System'); ?><td><?php echo html_select("driver", $drivers, DRIVER, "loginDriver(this);"); ?>
|
||||
<tr><th><?php echo lang('Server'); ?><td><input name="server" value="<?php echo h(SERVER); ?>">
|
||||
<tr><th><?php echo lang('Username'); ?><td><input id="username" name="username" value="<?php echo h($_GET["username"]); ?>">
|
||||
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
document.getElementById('username').focus();
|
||||
var username = document.getElementById('username');
|
||||
username.focus();
|
||||
username.form['driver'].onchange();
|
||||
</script>
|
||||
<?php
|
||||
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
||||
|
|
|
@ -58,6 +58,13 @@ function typePassword(el, disable) {
|
|||
}
|
||||
}
|
||||
|
||||
function loginDriver(driver) {
|
||||
var trs = driver.parentNode.parentNode.parentNode.rows;
|
||||
for (var i=1; i < trs.length; i++) {
|
||||
trs[i].className = (/sqlite/.test(driver.value) ? 'hidden' : '');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var added = '.', rowCount;
|
||||
|
|
Loading…
Add table
Reference in a new issue