Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cms/static/js/views/uploads.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'edx-ui
renderContents: function() {
var isValid = this.model.isValid(),
selectedFile = this.model.get('selectedFile'),
oldInput = this.$('input[type=file]').get(0);
oldInput = this.$('input[type=file]');
BaseModal.prototype.renderContents.call(this);
// Ideally, we'd like to tell the browser to pre-populate the
// <input type="file"> with the selectedFile if we have one -- but
Expand All @@ -44,7 +44,7 @@ define(['jquery', 'underscore', 'gettext', 'js/views/modals/base_modal', 'edx-ui
// a blank input to prompt the user to upload a different (valid) file.
if (selectedFile && isValid) {
$(oldInput).removeClass('error');
this.$('input[type=file]').replaceWith(HtmlUtils.ensureHtml(oldInput).toString());
this.$('input[type=file]').replaceWith(HtmlUtils.HTML(oldInput).toString());
this.$('.action-upload').removeClass('disabled');
} else {
this.$('.action-upload').addClass('disabled');
Expand Down