Node.js based forum software built for the modern web
show error message on failed login
Baris Soner Usaklia69140faa998
diff --git a/public/src/forum/login.js b/public/src/forum/login.jsindex 74bedd54ba..7b475c566b 100644--- a/public/src/forum/login.js+++ b/public/src/forum/login.js@@ -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();}());diff --git a/public/templates/login.tpl b/public/templates/login.tplindex e8e85b9235..4298194ee5 100644--- a/public/templates/login.tpl+++ b/public/templates/login.tpl@@ -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>