/login/: Remove previous alerts before displaying new alerts.

The issue is that the server wants to display an error when you make a
request and fail, but the jQuery form validator also wants to display
errors at the same time. This removes the server errors to display the
jQuery.

Fixes: #8239.
This commit is contained in:
Brock Whittaker 2018-02-01 17:26:16 -08:00 committed by Tim Abbott
parent 68df428de9
commit 61dad0701a
1 changed files with 5 additions and 0 deletions

View File

@ -82,5 +82,10 @@ $(function () {
form.submit();
},
invalidHandler: function () {
// this removes all previous errors that were put on screen
// by the server.
$("#login_form .alert.alert-error").remove();
},
});
});