mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
added ability to change currency on payment page
This commit is contained in:
parent
58f6ae323b
commit
52c54e7300
3 changed files with 32 additions and 1 deletions
|
@ -1,4 +1,9 @@
|
|||
extends ../layout
|
||||
block scripts
|
||||
script(type='text/javascript').
|
||||
window.recomendedCurrency = '#{currency}'
|
||||
window.plan_code = '#{plan_code}'
|
||||
|
||||
|
||||
block content
|
||||
- locals.supressDefaultJs = true
|
||||
|
@ -8,11 +13,24 @@ block content
|
|||
.content.content-alt
|
||||
.container
|
||||
.row
|
||||
.col-md-6.col-md-offset-3
|
||||
.col-md-6.col-md-offset-1
|
||||
.card
|
||||
.page-header
|
||||
h1.text-centered #{translate("new_subscription")}
|
||||
#subscribeForm #{translate("loading_billing_form")}...
|
||||
.col-md-5(ng-controller="NewSubscriptionController")
|
||||
span.dropdown.col-md-1.changePlanButton()
|
||||
a.btn.btn-primary.dropdown-toggle(
|
||||
href="#",
|
||||
data-toggle="dropdown"
|
||||
)
|
||||
| {{currencyCode}} ({{plans[currencyCode]['symbol']}})
|
||||
ul.dropdown-menu(role="menu")
|
||||
li(ng-repeat="(currency, value) in plans", dropdown-toggle)
|
||||
a(
|
||||
ng-click="changeCurrency(currency)",
|
||||
) {{currency}} ({{value['symbol']}})
|
||||
|
||||
|
||||
script(type="text/javascript").
|
||||
ga('send', 'event', 'pageview', 'payment_form', "#{plan_code}")
|
||||
|
|
|
@ -11,6 +11,7 @@ define [
|
|||
"main/system-messages"
|
||||
"main/translations"
|
||||
"main/subscription-dashboard"
|
||||
"main/new-subscription"
|
||||
"main/annual-upgrade"
|
||||
"analytics/AbTestingManager"
|
||||
"directives/asyncForm"
|
||||
|
|
12
services/web/public/coffee/main/new-subscription.coffee
Normal file
12
services/web/public/coffee/main/new-subscription.coffee
Normal file
|
@ -0,0 +1,12 @@
|
|||
define [
|
||||
"base"
|
||||
], (App)->
|
||||
|
||||
App.controller "NewSubscriptionController", ($scope, MultiCurrencyPricing)->
|
||||
|
||||
|
||||
$scope.currencyCode = MultiCurrencyPricing.currencyCode
|
||||
$scope.plans = MultiCurrencyPricing.plans
|
||||
|
||||
$scope.changeCurrency = (newCurrency)->
|
||||
window.location = "/user/subscription/new?planCode=#{window.plan_code}¤cy=#{newCurrency}"
|
Loading…
Reference in a new issue