Render errors in JSON in the schedule correctly

This commit is contained in:
Ana 2016-08-09 14:55:39 +02:00
parent e8261d41bc
commit a1c7f67735
5 changed files with 32 additions and 37 deletions

View file

@ -23,14 +23,12 @@ $(function () {
}
var callback = function(data) {
if(data.status != 'ok'){
showError(data.status);
}
showError($.parseJSON(data.responseText).errors);
}
$.ajax({
url: url,
type: method,
success: callback,
error: callback,
dataType: 'json'
});
});