mirror of
https://github.com/pi-hole/web.git
synced 2025-12-26 13:36:22 +00:00
Merge pull request #318 from pi-hole/tweak/loginpage
Ctrl+Return on login page -> Go immediately to Settings page
This commit is contained in:
@@ -196,3 +196,11 @@ if(versionCompare(piholeVersion, "v2.9.5") < 1)
|
||||
{
|
||||
$("#btnSearchExact").hide();
|
||||
}
|
||||
|
||||
// Handle Strg + Enter button on Login page
|
||||
$(document).keypress(function(e) {
|
||||
if((e.keyCode === 10 || e.keyCode === 13) && e.ctrlKey && $("#loginpw").is(":focus")) {
|
||||
$("#loginform").attr("action", "settings.php");
|
||||
$("#loginform").submit();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -442,7 +442,7 @@
|
||||
// Show Logout button if $auth is set and authorization is required
|
||||
if(strlen($pwhash) > 0) { ?>
|
||||
<li>
|
||||
<a href="index.php?logout">
|
||||
<a href="?logout">
|
||||
<i class="fa fa-user-times"></i> <span>Logout</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -13,13 +13,19 @@
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<form action="" method="post">
|
||||
<form action="" id="loginform" method="post">
|
||||
<div class="form-group has-feedback <?php if ($wrongpassword) { ?>has-error<?php } ?> ">
|
||||
<input type="password" name="pw" class="form-control" placeholder="Password" autofocus>
|
||||
<input type="password" id="loginpw" name="pw" class="form-control" placeholder="Password" autofocus>
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-4 col-xs-offset-8">
|
||||
<div class="col-xs-8">
|
||||
<ul>
|
||||
<li><tt>Return</tt> → Log in and go to requested page (<?php echo $scriptname; ?>)</li>
|
||||
<li><tt>Ctrl+Return</tt> → Log in and go to Settings page</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<button type="submit" href="#" class="btn btn-primary pull-right"><i class="glyphicon glyphicon-log-in"></i> Log in</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user