mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Group plans copy changes (#8546)
* Added new message for when user has group plan * Changed subscription wording to group plan * Updated copy
This commit is contained in:
@@ -296,6 +296,7 @@ function($rootScope, User, $http, Content) {
|
||||
}
|
||||
|
||||
Payments.cancelSubscription = function(config) {
|
||||
if (config && config.group && !confirm(window.env.t('confirmCancelGroupPlan'))) return;
|
||||
if (!confirm(window.env.t('sureCancelSub'))) return;
|
||||
|
||||
var group;
|
||||
|
||||
@@ -258,5 +258,9 @@
|
||||
"paymentDetails": "Payment Details",
|
||||
"aboutToJoinCancelledGroupPlan": "You are about to join a group with a canceled plan. You will NOT receive a free subscription.",
|
||||
"cannotChangeLeaderWithActiveGroupPlan": "You can not change the leader while the group has an active plan.",
|
||||
"leaderCannotLeaveGroupWithActiveGroup": "A leader can not leave a group while the group has an active plan"
|
||||
"leaderCannotLeaveGroupWithActiveGroup": "A leader can not leave a group while the group has an active plan",
|
||||
"youHaveGroupPlan": "You have a free subscription because you are a member of a group that has a Group Plan. This will end when you are no longer in the group that has a group plan. Any months of extra subscription credit you have will be applied at the end of the group plan.",
|
||||
"cancelGroupSub": "Cancel Group Plan",
|
||||
"confirmCancelGroupPlan": "Are you sure you want to cancel the group plan and remove its benefits from all members, including their free subscriptions?",
|
||||
"purchasedGroupPlanPlanExtraMonths": "You have <%= months %> months of extra group plan credit."
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ script(id='partials/options.settings.subscription.html',type='text/ng-template',
|
||||
| #{env.t('subCanceled')} <strong>{{user.purchased.plan.dateTerminated | date:user.preferences.dateFormat}}</strong>
|
||||
tr(ng-if='!user.purchased.plan.dateTerminated'): td
|
||||
h4=env.t('subscribed')
|
||||
p(ng-if='user.purchased.plan.planId')=env.t('purchasedPlanId', {price: '{{Content.subscriptionBlocks[user.purchased.plan.planId].price}}', months: '{{Content.subscriptionBlocks[user.purchased.plan.planId].months}}', plan: '{{user.purchased.plan.paymentMethod}}'})
|
||||
p(ng-if='user.purchased.plan.planId && user.purchased.plan.customerId !== "group-plan"')=env.t('purchasedPlanId', {price: '{{Content.subscriptionBlocks[user.purchased.plan.planId].price}}', months: '{{Content.subscriptionBlocks[user.purchased.plan.planId].months}}', plan: '{{user.purchased.plan.paymentMethod}}'})
|
||||
p(ng-if='user.purchased.plan.customerId === "group-plan"')=env.t('youHaveGroupPlan')
|
||||
tr(ng-if='user.purchased.plan.extraMonths'): td
|
||||
span.glyphicon.glyphicon-credit-card
|
||||
| #{env.t('purchasedPlanExtraMonths', {months: '{{user.purchased.plan.extraMonths | number:2}}'})}
|
||||
@@ -26,6 +27,7 @@ script(id='partials/options.settings.subscription.html',type='text/ng-template',
|
||||
li #{env.t('consecutiveMonths')} {{user.purchased.plan.consecutive.count + user.purchased.plan.consecutive.offset}}
|
||||
li #{env.t('gemCapExtra')} {{user.purchased.plan.consecutive.gemCapExtra}}
|
||||
li #{env.t('mysticHourglasses')} {{user.purchased.plan.consecutive.trinkets}}
|
||||
|
||||
div(ng-if='!user.purchased.plan.customerId || (user.purchased.plan.customerId && user.purchased.plan.dateTerminated)')
|
||||
h4(ng-if='(user.purchased.plan.customerId && user.purchased.plan.dateTerminated)')= env.t("resubscribe")
|
||||
.form-group.reduce-top-margin
|
||||
|
||||
@@ -15,11 +15,11 @@ mixin groupSubscription()
|
||||
i.glyphicon.glyphicon-time
|
||||
| #{env.t('subCanceled')} <strong>{{moment(group.purchased.plan.dateTerminated).format('MM/DD/YYYY')}}</strong>
|
||||
tr(ng-if='!group.purchased.plan.dateTerminated'): td
|
||||
h3=env.t('subscribed')
|
||||
h3=env.t('paymentDetails')
|
||||
p(ng-if='group.purchased.plan.planId')=env.t('groupSubscriptionPrice')
|
||||
tr(ng-if='group.purchased.plan.extraMonths'): td
|
||||
span.glyphicon.glyphicon-credit-card
|
||||
| #{env.t('purchasedPlanExtraMonths', {months: '{{group.purchased.plan.extraMonths | number:2}}'})}
|
||||
| #{env.t('purchasedGroupPlanPlanExtraMonths', {months: '{{group.purchased.plan.extraMonths | number:2}}'})}
|
||||
tr(ng-if='group.purchased.plan.consecutive.count || group.purchased.plan.consecutive.offset'): td
|
||||
span.glyphicon.glyphicon-forward
|
||||
| #{env.t('consecutiveSubscription')}
|
||||
@@ -30,7 +30,7 @@ mixin groupSubscription()
|
||||
|
||||
div(ng-if='group.purchased.plan.customerId')
|
||||
.btn.btn-primary(ng-if='!group.purchased.plan.dateTerminated && group.purchased.plan.paymentMethod=="Stripe"', ng-click='Payments.showStripeEdit({groupId: group.id})')=env.t('subUpdateCard')
|
||||
.btn.btn-sm.btn-danger(ng-if='!group.purchased.plan.dateTerminated', ng-click='Payments.cancelSubscription({group: group})')=env.t('cancelSub')
|
||||
.btn.btn-sm.btn-danger(ng-if='!group.purchased.plan.dateTerminated', ng-click='Payments.cancelSubscription({group: group})')=env.t('cancelGroupSub')
|
||||
|
||||
.row
|
||||
.col-md-12(ng-if='!group.purchased.plan.customerId || (group.purchased.plan.customerId && group.purchased.plan.dateTerminated)', ng-init="_subscription.key='group_monthly'")
|
||||
|
||||
Reference in New Issue
Block a user