[-] BO : better error display for forgotten password #PSCSX-58
This commit is contained in:
1 parent
0b147f626f
commit
782975c708
1 file changed
+8
-10
+8
-10
@@ -152,16 +152,15 @@ function doAjaxForgot() {
|
|||||||
$('#error').hide();
|
$('#error').hide();
|
||||||
$('#forgot_password_form').fadeIn('slow', function() {
|
$('#forgot_password_form').fadeIn('slow', function() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: 'POST',
|
||||||
headers: { "cache-control": "no-cache" },
|
headers: {'cache-control': 'no-cache'},
|
||||||
url: "ajax-tab.php" + '?rand=' + new Date().getTime(),
|
url: 'ajax-tab.php' + '?rand=' + new Date().getTime(),
|
||||||
async: true,
|
async: true,
|
||||||
dataType: "json",
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
ajax: "1",
|
ajax: 1,
|
||||||
token: "",
|
controller: 'AdminLogin',
|
||||||
controller: "AdminLogin",
|
submitForgot: 1,
|
||||||
submitForgot: "1",
|
|
||||||
email_forgot: $('#email_forgot').val()
|
email_forgot: $('#email_forgot').val()
|
||||||
},
|
},
|
||||||
success: function(jsonData) {
|
success: function(jsonData) {
|
||||||
@@ -174,8 +173,7 @@ function doAjaxForgot() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
error: function(XMLHttpRequest, textStatus, errorThrown) {
|
||||||
$('#error').html('<h3>TECHNICAL ERROR:</h3><p>Details: Error thrown: ' + XMLHttpRequest + '</p><p>Text status: ' + textStatus + '</p>').show();
|
$('#error').html(XMLHttpRequest.responseText).removeClass('hide').fadeIn('slow');
|
||||||
$('#forgot_password_form').fadeOut('slow');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user