mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
fix(subscriptions): expose cancelSubscription on $rootScope (don't know
why $scope doesn't work here). Fix UI bug
This commit is contained in:
parent
c2aed860db
commit
0dadc86a61
2 changed files with 1 additions and 4 deletions
|
|
@ -121,7 +121,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
});
|
||||
}
|
||||
|
||||
$scope.cancelSubscription = function(){
|
||||
$rootScope.cancelSubscription = function(){
|
||||
if (!confirm(window.env.t('sureCancelSub'))) return;
|
||||
window.location.href = '/' + user.purchased.plan.paymentMethod.toLowerCase() + '/subscribe/cancel?_id=' + user._id + '&apiToken=' + user.apiToken;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,9 +183,6 @@ script(id='partials/feature-matrix-check.html',type='text/ng-template')
|
|||
label
|
||||
|
||||
script(id='partials/options.settings.subscription.html',type='text/ng-template')
|
||||
.container-fluid
|
||||
.row
|
||||
.col-md-6
|
||||
.well
|
||||
h2=env.t('individualSub')
|
||||
div(ng-if='!user.purchased.plan.customerId')
|
||||
|
|
|
|||
Loading…
Reference in a new issue