From 1c4f9da92df2846f6894ef7f367a0da89940d606 Mon Sep 17 00:00:00 2001 From: noraiz-anwar Date: Wed, 17 Jul 2019 11:32:45 +0500 Subject: [PATCH] improved quality of multiple files --- cms/templates/certificates.html | 18 ++++---- cms/templates/container.html | 2 +- .../js/certificate-web-preview.underscore | 12 +++--- cms/templates/js/license-selector.underscore | 20 ++++----- .../js/metadata-file-uploader-item.underscore | 4 +- cms/templates/textbooks.html | 9 ++-- common/lib/xmodule/xmodule/lti_module.py | 35 +++++++++------- .../js/student_account/views/RegisterView.js | 33 +++++++-------- lms/templates/api_admin/catalogs/edit.html | 7 ++-- lms/templates/api_admin/catalogs/list.html | 7 ++-- lms/templates/certificates/_badges-modal.html | 1 + .../core/lib/license/templates/license.html | 2 +- .../templates/share_modal.underscore | 41 ++++++++++++------- .../lms/templates/register-shib.html | 32 +++++++++------ 14 files changed, 127 insertions(+), 96 deletions(-) diff --git a/cms/templates/certificates.html b/cms/templates/certificates.html index 12243fa231..13792d216b 100644 --- a/cms/templates/certificates.html +++ b/cms/templates/certificates.html @@ -1,9 +1,11 @@ +<%page expression_filter="h"/> <%inherit file="base.html" /> <%def name="online_help_token()"><% return "certificates" %> <%namespace name='static' file='static_content.html'/> <%! from contentstore import utils from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text from openedx.core.djangolib.js_utils import ( dump_js_escaped_json, js_escaped_string ) @@ -25,8 +27,8 @@ from openedx.core.djangolib.js_utils import ( window.CMS = window.CMS || {}; CMS.URL = CMS.URL || {}; CMS.User = CMS.User || {}; -CMS.URL.UPLOAD_ASSET = '${upload_asset_url}'; -CMS.User.isGlobalStaff = '${is_global_staff}'=='True' ? true : false; +CMS.URL.UPLOAD_ASSET = '${upload_asset_url | n, js_escaped_string}'; +CMS.User.isGlobalStaff = '${is_global_staff | n, js_escaped_string}'=='True' ? true : false; @@ -88,13 +90,13 @@ CMS.User.isGlobalStaff = '${is_global_staff}'=='True' ? true : false;

${_("Working with Certificates")}

${_("Specify a course title to use on the certificate if the course's official title is too long to be displayed well.")}

${_("For verified certificates, specify between one and four signatories and upload the associated images.")}

-

${_("To edit or delete a certificate before it is activated, hover over the top right corner of the form and select {em_start}Edit{em_end} or the delete icon.").format(em_start="", em_end="")}

-

${_("To view a sample certificate, choose a course mode and select {em_start}Preview Certificate{em_end}.").format(em_start='', em_end="")}

+

${Text(_("To edit or delete a certificate before it is activated, hover over the top right corner of the form and select {em_start}Edit{em_end} or the delete icon.")).format(em_start=HTML(""), em_end=HTML(""))}

+

${Text(_("To view a sample certificate, choose a course mode and select {em_start}Preview Certificate{em_end}.")).format(em_start=HTML(''), em_end=HTML(""))}

${_("Issuing Certificates to Learners")}

-

${_("To begin issuing course certificates, a course team member with either the Staff or Admin role selects {em_start}Activate{em_end}. Only course team members with these roles can edit or delete an activated certificate.").format(em_start="", em_end="")}

-

${_("{em_start}Do not{em_end} delete certificates after a course has started; learners who have already earned certificates will no longer be able to access them.").format(em_start="", em_end="")}

-

${_("Learn more about certificates")}

+

${Text(_("To begin issuing course certificates, a course team member with either the Staff or Admin role selects {em_start}Activate{em_end}. Only course team members with these roles can edit or delete an activated certificate.")).format(em_start=HTML(""), em_end=HTML(""))}

+

${Text(_("{em_start}Do not{em_end} delete certificates after a course has started; learners who have already earned certificates will no longer be able to access them.")).format(em_start=HTML(""), em_end=HTML(""))}

+

${_("Learn more about certificates")}

@@ -108,7 +110,7 @@ CMS.User.isGlobalStaff = '${is_global_staff}'=='True' ? true : false;

${_("Other Course Settings")}

diff --git a/cms/templates/js/certificate-web-preview.underscore b/cms/templates/js/certificate-web-preview.underscore index 16452fb96f..566a1544f8 100644 --- a/cms/templates/js/certificate-web-preview.underscore +++ b/cms/templates/js/certificate-web-preview.underscore @@ -1,17 +1,17 @@ - + - class="button preview-certificate-link" target="_blank"> - <%= gettext("Preview Certificate") %> + class="button preview-certificate-link" rel="noopener" target="_blank"> + <%- gettext("Preview Certificate") %> diff --git a/cms/templates/js/license-selector.underscore b/cms/templates/js/license-selector.underscore index 90230b11a7..2245f7deb0 100644 --- a/cms/templates/js/license-selector.underscore +++ b/cms/templates/js/license-selector.underscore @@ -1,6 +1,6 @@

- <%= gettext("License Type") %> + <%- gettext("License Type") %>

% endif @@ -165,17 +173,17 @@ from openedx.core.djangolib.js_utils import js_escaped_string <% honor_code_path = marketing_link('TOS') + "#honor" %> - +
% if course_id and enrollment_action: - - + + % endif