Only show university info box on new plans page student tab (#8823)

GitOrigin-RevId: 057baae295443d9a924b4b0754cdb12ebe330976
This commit is contained in:
M Fahru 2022-07-12 05:58:24 -04:00 committed by Copybot
parent cc92f264d2
commit 4dbabe3a8d
2 changed files with 12 additions and 1 deletions

View file

@ -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 .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')} 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')} p.plans-v2-university-info-text #{translate('student_and_faculty_support_make_difference')}

View file

@ -50,6 +50,8 @@ function selectTab(viewTab) {
} else { } else {
toggleMonthlyAnnualSwitching(viewTab, currentMonthlyAnnualSwitchValue) toggleMonthlyAnnualSwitching(viewTab, currentMonthlyAnnualSwitchValue)
} }
toggleUniversityInfo(viewTab)
} }
function setUpTabSwitching() { 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() { function selectViewFromHash() {
try { try {
const params = new URLSearchParams(window.location.hash.substring(1)) const params = new URLSearchParams(window.location.hash.substring(1))