Display the correct AJAX request error property.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2018-10-03 15:11:43 -04:00
parent e9db07bfd3
commit 72678e31f3

View File

@@ -160,13 +160,13 @@ class PartialNavigation {
*/
if (djangoDEBUG) {
$('#ajax-content').html('<pre class="text-primary" style="background-color:#ffe7ae"><code>' + jqXHR.responseText + '</code></pre>');
$('#ajax-content').html('<pre class="text-primary" style="background-color:#ffe7ae"><code>' + jqXHR.statusText + '</code></pre>');
} else {
if (jqXHR.status == 0) {
$('#modal-server-error .modal-body').html($('#template-error').html());
$('#modal-server-error').modal('show')
} else {
$('#ajax-content').html(jqXHR.responseText);
$('#ajax-content').html(jqXHR.statusText);
}
}
}