diff options
author | Struan Donald <struan@exo.org.uk> | 2013-04-25 14:05:48 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2013-04-25 14:05:48 +0100 |
commit | 59b6ba70be16233c716d7a4f93a3970640dc9edf (patch) | |
tree | ef46785644464aa28ab75cfd0ad425ce95c69310 /www/js/models | |
parent | fcee03229f60716e1924d3e73e0279311c79e356 (diff) |
handle report submission errors correctly when reporting with a photo
Diffstat (limited to 'www/js/models')
-rw-r--r-- | www/js/models/report.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/www/js/models/report.js b/www/js/models/report.js index f98c072..8dba8de 100644 --- a/www/js/models/report.js +++ b/www/js/models/report.js @@ -88,7 +88,11 @@ catch(err) { data = {}; } - that.trigger('sync', that, data, options); + if ( data.success ) { + that.trigger('sync', that, data, options); + } else { + that.trigger('error', that, data, options); + } } else { that.trigger('error', that, FMS.strings.report_send_error, options); } |