From 0d1558237fab43ff20a3f356bd841b8cdc8784d6 Mon Sep 17 00:00:00 2001 From: Harry Rein Date: Wed, 20 Dec 2017 14:02:04 -0500 Subject: [PATCH] Hide policy information when leaving a session. LEARNER-3692 --- .../js/learner_dashboard/views/course_entitlement_view.js | 2 ++ lms/templates/dashboard/_dashboard_course_listing.html | 1 + 2 files changed, 3 insertions(+) diff --git a/lms/static/js/learner_dashboard/views/course_entitlement_view.js b/lms/static/js/learner_dashboard/views/course_entitlement_view.js index b3e42abbb0..e5bee8555b 100644 --- a/lms/static/js/learner_dashboard/views/course_entitlement_view.js +++ b/lms/static/js/learner_dashboard/views/course_entitlement_view.js @@ -62,6 +62,7 @@ this.$courseCardMessages = $(options.courseCardMessages); // Additional session messages this.$courseTitleLink = $(options.courseTitleLink); // Title link to course home page this.$courseImageLink = $(options.courseImageLink); // Image link to course home page + this.$policyMsg = $(options.policyMsg); // Message for policy information // Bind action elements with associated events to objects outside this view this.$dateDisplayField = this.$parentEl ? this.$parentEl.find(options.dateDisplayField) : @@ -192,6 +193,7 @@ this.$triggerOpenBtn.addClass('hidden'); this.$enterCourseBtn.addClass('hidden'); this.$courseCardMessages.remove(); + this.$policyMsg.remove(); this.$('.enroll-btn-initial').focus(); HtmlUtils.setHtml( this.$dateDisplayField, diff --git a/lms/templates/dashboard/_dashboard_course_listing.html b/lms/templates/dashboard/_dashboard_course_listing.html index 3a653e5868..fb65200ffb 100644 --- a/lms/templates/dashboard/_dashboard_course_listing.html +++ b/lms/templates/dashboard/_dashboard_course_listing.html @@ -311,6 +311,7 @@ from util.course import get_link_for_about_page, get_encoded_course_sharing_utm_ courseTitleLink: '${ '#course-card-' + str(course_card_index) + ' .course-title a' | n, js_escaped_string }', courseImageLink: '${ '#course-card-' + str(course_card_index) + ' .wrapper-course-image > a' | n, js_escaped_string }', dateDisplayField: '${ '#course-card-' + str(course_card_index) + ' .info-date-block' | n, js_escaped_string }', + policyMsg: '${ '#course-card-' + str(course_card_index) + ' .info-expires-at' | n, js_escaped_string }', enterCourseBtn: '${ '#course-card-' + str(course_card_index) + ' .enter-course' | n, js_escaped_string }', availableSessions: '${ entitlement_available_sessions | n, dump_js_escaped_json }', entitlementUUID: '${ entitlement.course_uuid | n, js_escaped_string }',