From 4dbabe3a8dff8a82c8084d913416bb7263af7623 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Tue, 12 Jul 2022 05:58:24 -0400 Subject: [PATCH] Only show university info box on new plans page student tab (#8823) GitOrigin-RevId: 057baae295443d9a924b4b0754cdb12ebe330976 --- .../subscriptions/plans-marketing/v2/_university_info.pug | 5 ++++- .../js/pages/user/subscription/plans-v2/plans-v2-main.js | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/services/web/app/views/subscriptions/plans-marketing/v2/_university_info.pug b/services/web/app/views/subscriptions/plans-marketing/v2/_university_info.pug index 1429d9a87b..916303993d 100644 --- a/services/web/app/views/subscriptions/plans-marketing/v2/_university_info.pug +++ b/services/web/app/views/subscriptions/plans-marketing/v2/_university_info.pug @@ -1,4 +1,7 @@ -.row.row-spaced-large.text-centered +.row.row-spaced-large.text-centered( + data-ol-plans-university-info-container + hidden +) .col-sm-8.col-sm-offset-2.col-xs-12.card.plans-v2-university-info h3.plans-v2-university-info-header #{translate('would_you_like_to_see_a_university_subscription')} p.plans-v2-university-info-text #{translate('student_and_faculty_support_make_difference')} diff --git a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js index c48e19e9bb..840202d3bc 100644 --- a/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js +++ b/services/web/frontend/js/pages/user/subscription/plans-v2/plans-v2-main.js @@ -50,6 +50,8 @@ function selectTab(viewTab) { } else { toggleMonthlyAnnualSwitching(viewTab, currentMonthlyAnnualSwitchValue) } + + toggleUniversityInfo(viewTab) } function setUpTabSwitching() { @@ -90,6 +92,12 @@ function setUpGroupPlanPricingChange() { ) } +function toggleUniversityInfo(viewTab) { + const el = document.querySelector('[data-ol-plans-university-info-container]') + + el.hidden = viewTab !== 'student' +} + function selectViewFromHash() { try { const params = new URLSearchParams(window.location.hash.substring(1))