mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 04:21:17 +01:00
show error message on failed login
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
data: loginData,
|
||||
success: function(data, textStatus, jqXHR) {
|
||||
if(!data.success) {
|
||||
$('#login-error-notify').html(data.message).show();
|
||||
$('#login-error-notify').show();
|
||||
} else {
|
||||
$('#login-error-notify').hide();
|
||||
window.location.replace(RELATIVE_PATH + "/?loggedin");
|
||||
@@ -44,5 +44,10 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#login-error-notify button').on('click', function() {
|
||||
$('#login-error-notify').hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
document.querySelector('#content input').focus();
|
||||
}());
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="row">
|
||||
<div class="{login_window:spansize}">
|
||||
<div class="well well-lg">
|
||||
<div class="alert alert-error" id="error" style="display:none">
|
||||
<div class="alert alert-danger" id="login-error-notify" style="display:none">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<strong>Failed Login Attempt</strong> <p></p>
|
||||
</div>
|
||||
@@ -45,8 +45,7 @@
|
||||
</div>
|
||||
<input type="hidden" name="_csrf" value="{token}" id="csrf-token" />
|
||||
</form>
|
||||
|
||||
<div id="login-error-notify" class="alert alert-danger hide">Invalid username/password</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user