diff options
Diffstat (limited to 'src/js/models/report.js')
-rw-r--r-- | src/js/models/report.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/models/report.js b/src/js/models/report.js index 85d6e93..477d16c 100644 --- a/src/js/models/report.js +++ b/src/js/models/report.js @@ -100,8 +100,10 @@ } if ( data.success ) { that.trigger('sync', that, data, options); - } else { + } else if ( data.errors ) { that.trigger('invalid', that, data, options); + } else { + that.trigger('error', that, FMS.strings.report_send_error, options); } } else { that.trigger('error', that, FMS.strings.report_send_error, options); @@ -141,7 +143,7 @@ }, error: function (data, status, errorThrown ) { console.log(FMS.strings.report_send_error); - options.error( data, status, errorThrown ); + that.trigger('error', that, data, status, errorThrown ); } } ); } |