Commit 8a172aec authored by Marcel Rieger's avatar Marcel Rieger
Browse files

Fix json responses on login and password reset pages.

parent 33af952c
......@@ -75,8 +75,8 @@ define([
d.setTime(d.getTime() + 60e3);
$.cookie("tmpPass", pass, { expires: d });
window.location.href = self.url.dynamic(self.config.requestedPath);
}).fail(function(response, status, message) {
$("#login-alert").fadeIn(100).render({alert: response.responseText || message});
}).fail(function(res) {
$("#login-alert").fadeIn(100).render({alert: res.responseJSON.message});
$("#login-name").focus();
});
......@@ -108,8 +108,8 @@ define([
window.location.href = self.url.dynamic("/");
}, 4000);
}
}).fail(function(response, status, message) {
$("#register-alert").fadeIn(100).render({alert: response.responseText || message});
}).fail(function(res) {
$("#register-alert").fadeIn(100).render({alert: res.responseJSON.message});
$("#register-name").focus();
});
......@@ -135,8 +135,8 @@ define([
setTimeout(function() {
window.location.href = self.url.dynamic("/");
}, 4000);
}).fail(function(response, status, message) {
$("#forgot-alert").fadeIn(100).render({alert: response.responseText || message});
}).fail(function(res) {
$("#forgot-alert").fadeIn(100).render({alert: res.responseJSON.message});
$("#forgot-name").focus();
});
......
......@@ -76,8 +76,8 @@ define([
expires: d
});
window.location.href = self.url.dynamic("/");
}).fail(function(response, status, message) {
Dialog.alert(response.responseText || message, {
}).fail(function(res) {
Dialog.alert(res.responseJSON.message, {
onClose: function() {
$("#password1").focus();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment