Skip to content

Commit

Permalink
Merge pull request openedx#23881 from edx/private_to_public_ae014af
Browse files Browse the repository at this point in the history
Mergeback PR from private to public.
  • Loading branch information
edx-pipeline-bot authored May 4, 2020
2 parents 063e1d4 + ae014af commit 1d7d28e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cms/static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ define(['domReady', 'jquery', 'underscore', 'js/utils/cancel_on_escape', 'js/vie

analytics.track('Created a Course', course_info);
CreateCourseUtils.create(course_info, function(errorMessage) {
var msg = edx.HtmlUtils.joinHtml(edx.HtmlUtils.HTML('<p>'), errorMessage, edx.HtmlUtils.HTML('</p>'));
$('.create-course .wrap-error').addClass('is-shown');
$('#course_creation_error').html('<p>' + errorMessage + '</p>');
edx.HtmlUtils.setHtml($('#course_creation_error'), msg);
$('.new-course-save').addClass('is-disabled').attr('aria-disabled', true);
});
};
Expand Down Expand Up @@ -136,8 +137,9 @@ define(['domReady', 'jquery', 'underscore', 'js/utils/cancel_on_escape', 'js/vie

analytics.track('Created a Library', lib_info);
CreateLibraryUtils.create(lib_info, function(errorMessage) {
var msg = edx.HtmlUtils.joinHtml(edx.HtmlUtils.HTML('<p>'), errorMessage, edx.HtmlUtils.HTML('</p>'));
$('.create-library .wrap-error').addClass('is-shown');
$('#library_creation_error').html('<p>' + errorMessage + '</p>');
edx.HtmlUtils.setHtml($('#library_creation_error'), msg);
$('.new-library-save').addClass('is-disabled').attr('aria-disabled', true);
});
};
Expand Down
4 changes: 2 additions & 2 deletions cms/static/js/models/uploads.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ define(['backbone', 'underscore', 'gettext'], function(Backbone, _, gettext) {
validate: function(attrs, options) {
if (attrs.selectedFile && !this.checkTypeValidity(attrs.selectedFile)) {
return {
message: _.template(gettext('Only <%= fileTypes %> files can be uploaded. Please select a file ending in <%= fileExtensions %> to upload.'))( // eslint-disable-line max-len
message: _.template(gettext('Only <%- fileTypes %> files can be uploaded. Please select a file ending in <%- (fileExtensions) %> to upload.'))( // eslint-disable-line max-len
this.formatValidTypes()
),
attributes: {selectedFile: true}
Expand Down Expand Up @@ -62,7 +62,7 @@ define(['backbone', 'underscore', 'gettext'], function(Backbone, _, gettext) {
}
var or = gettext('or');
var formatTypes = function(types) {
return _.template('<%= initial %> <%= or %> <%= last %>')({
return _.template('<%- initial %> <%- or %> <%- last %>')({
initial: _.initial(types).join(', '),
or: or,
last: _.last(types)
Expand Down

0 comments on commit 1d7d28e

Please sign in to comment.