v1.18.x
Baris Usakli 11 years ago
parent bdb30976b5
commit bc8815cb94

@ -26,18 +26,22 @@ define(function() {
'_csrf': $('#csrf-token').val()
};
$('#login').attr('disabled', 'disabled').html('Logging in...');
$('#login-error-notify').hide();
$.ajax({
type: "POST",
url: RELATIVE_PATH + '/login',
data: loginData,
success: function(data, textStatus, jqXHR) {
if (!data.success) {
$('#login-error-notify').show();
$('#login').removeAttr('disabled').html('Login');
} else {
$('#login-error-notify').hide();
if(!app.previousUrl) {
app.previousUrl = '/';
$('#login').html('Redirecting...');
if(!app.previousUrl) {
app.previousUrl = '/';
}
if(app.previousUrl.indexOf('/reset/') != -1)
@ -50,6 +54,7 @@ define(function() {
},
error: function(data, textStatus, jqXHR) {
$('#login-error-notify').show();
$('#login').removeAttr('disabled').html('Login');
},
dataType: 'json',
async: true,

Loading…
Cancel
Save