|
|
@@ -6,7 +6,7 @@ block scripts
|
|
|
window.recomendedCurrency = '#{recomendedCurrency}'
|
|
|
window.recurlyApiKey = "!{settings.apis.recurly.publicKey}"
|
|
|
window.taxRate = #{taxRate}
|
|
|
-
|
|
|
+ window.subscription = !{JSON.stringify(subscription)}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -36,11 +36,11 @@ mixin printPlans(plans)
|
|
|
mixin printPlan(plan)
|
|
|
|
|
|
block content
|
|
|
- .content.content-alt
|
|
|
- .container
|
|
|
+ .content.content-alt(ng-cloak)
|
|
|
+ .container(ng-controller="UserSubscriptionController")
|
|
|
.row
|
|
|
- .col-md-8.col-md-offset-2
|
|
|
- .card
|
|
|
+ .col-md-8.col-md-offset-2 {{view}}
|
|
|
+ .card(ng-if="view == 'overview'")
|
|
|
.page-header
|
|
|
h1 #{translate("your_subscription")}
|
|
|
-if (groups.length != 0)
|
|
|
@@ -56,12 +56,10 @@ block content
|
|
|
a(href, ng-click="changePlan = true") !{translate("change_plan")}.
|
|
|
p !{translate("next_payment_of_x_collectected_on_y", {paymentAmmount:"<strong>" + subscription.price + "</strong>", collectionDate:"<strong>" + subscription.nextPaymentDueAt + "</strong>"})}
|
|
|
p.pull-right
|
|
|
-
|
|
|
- p: form(action="/user/subscription/cancel",method="post")
|
|
|
- input(type="hidden", name="_csrf", value=csrfToken)
|
|
|
+ p
|
|
|
a(href="/user/subscription/billing-details/edit").btn.btn-info #{translate("update_your_billing_details")}
|
|
|
- |
|
|
|
- input(type="submit", value="Cancel your subscription").btn.btn-primary#cancelSubscription
|
|
|
+ p
|
|
|
+ a(href, ng-click="switchToCancelationView()").btn.btn-success !{translate("cancel_your_subscription")}
|
|
|
when "canceled"
|
|
|
p !{translate("currently_subscribed_to_plan", {planName:"<strong>" + subscription.name + "</strong>"})}
|
|
|
p !{translate("subscription_canceled_and_terminate_on_x", {terminateDate:"<strong>" + subscription.nextPaymentDueAt + "</strong>"})}
|
|
|
@@ -76,7 +74,7 @@ block content
|
|
|
p !{translate("problem_with_subscription_contact_us")}
|
|
|
|
|
|
-if(subscription.groupPlan)
|
|
|
- a(href="/subscription/group").btn.btn-success !{translate("manage_group")}
|
|
|
+ a(href="/subscription/group").btn.btn-primary !{translate("manage_group")}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -107,6 +105,17 @@ block content
|
|
|
|
|
|
|
|
|
|
|
|
+ .card(ng-if="view == 'cancelation'")
|
|
|
+ .page-header
|
|
|
+ h1 #{translate("Cancel Subscription")}
|
|
|
+ div(ng-show="isMonthlyCollab")
|
|
|
+ span(ng-controller="ChangePlanFormController") downgrade to student for {{studentPrice}}
|
|
|
+ button(type="submit", ng-click="downgradeToStudent()", ng-disabled='inflight').btn.btn-success #{translate("change_to_this_plan")}
|
|
|
+
|
|
|
+ div(ng-if="!isMonthlyCollab")
|
|
|
+ form(action="/user/subscription/cancel",method="post")
|
|
|
+ input(type="hidden", name="_csrf", value=csrfToken)
|
|
|
+ input(type="submit", value="Cancel your subscription").btn.btn-primary#cancelSubscription
|
|
|
script(type="text/javascript").
|
|
|
$('#cancelSubscription').on("click", function() {
|
|
|
ga('send', 'event', 'subscription-funnel', 'cancelation')
|