From 2832233eb9f7f0d4eed648707152e23999ea5cbe Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Thu, 30 May 2013 13:54:00 -0400 Subject: [PATCH] Better handling for chapter upload error --- cms/templates/textbooks.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cms/templates/textbooks.html b/cms/templates/textbooks.html index 1c5410ae76..1ef39df9e9 100644 --- a/cms/templates/textbooks.html +++ b/cms/templates/textbooks.html @@ -176,6 +176,9 @@ CMS.Views.UploadDialog = Backbone.View.extend({ success: _.bind(this.success, this), error: _.bind(this.error, this), uploadProgress: _.bind(this.progress, this), + data: { + notifyOnError: false + } }); }, progress: function(event, position, total, percentComplete) { @@ -198,7 +201,11 @@ CMS.Views.UploadDialog = Backbone.View.extend({ this.remove(); }, error: function() { - this.model.set("uploading", false); + this.model.set({ + "uploading": false, + "uploadedBytes": 0, + "title": gettext("We're sorry, there was an error"), + }); } }) var section = new CMS.Models.Section({