Hide credentials for SQLite
This commit is contained in:
parent
9e8ab1df31
commit
1d47454079
|
@ -47,13 +47,15 @@ class Adminer {
|
||||||
global $drivers;
|
global $drivers;
|
||||||
?>
|
?>
|
||||||
<table cellspacing="0">
|
<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('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('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">
|
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="password">
|
||||||
</table>
|
</table>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
document.getElementById('username').focus();
|
var username = document.getElementById('username');
|
||||||
|
username.focus();
|
||||||
|
username.form['driver'].onchange();
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
|
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;
|
var added = '.', rowCount;
|
||||||
|
|
Loading…
Reference in a new issue