Merge pull request #2183 from overleaf/em-plans-faq

Allow linking inside plans FAQ invoice answer

GitOrigin-RevId: 20fb07f0f8fafee65efaa1f4467013cccc7a154d
This commit is contained in:
Simon Detheridge
2019-10-01 12:47:32 +01:00
committed by sharelatex
parent 11ce07ec50
commit c1f43ad60e
2 changed files with 22 additions and 2 deletions
@@ -21,7 +21,7 @@
.col-md-6
h3 #{translate('faq_purchase_more_licenses_question')}
p !{translate('faq_purchase_more_licenses_answer', { groupLink: translate('discounted_group_accounts') })} 
a(href, ng-click="openGroupPlanModal()") #{translate("get_in_touch_for_details")}
a(href='#groups', ng-click="openGroupPlanModal()") #{translate("get_in_touch_for_details")}
.col-md-6
h3 #{translate('faq_monthly_or_annual_question')}
p #{translate('faq_monthly_or_annual_answer')}
@@ -31,4 +31,4 @@
p #{translate('faq_how_to_pay_answer')}
.col-md-6
h3 #{translate('faq_pay_by_invoice_question')}
p !{translate('faq_pay_by_invoice_answer', { groupLink: translate('discounted_group_accounts') })}
p !{translate('faq_pay_by_invoice_answer', { payByInvoiceLinkOpen: '<a href="#pay-by-invoice" ng-click="openPayByInvoiceModal()">', payByInvoiceLinkClose: '</a>' })}
+20
View File
@@ -275,6 +275,26 @@ define(['base'], function(App) {
$scope.openGroupPlanModal()
}
$scope.openPayByInvoiceModal = function() {
const path = `${window.location.pathname}${window.location.search}`
history.replaceState(null, document.title, path + '#pay-by-invoice')
$modal
.open({
templateUrl: 'groupPlanModalInquiryTemplate'
})
.result.finally(() =>
history.replaceState(null, document.title, window.location.pathname)
)
event_tracking.send(
'subscription-funnel',
'plans-page',
'group-inquiry-potential'
)
}
if ($location.hash() === 'pay-by-invoice') {
$scope.openPayByInvoiceModal()
}
var eventLabel = (label, location) => label
switchEvent = function(e, label, location) {