fix(subscriptions): expose cancelSubscription on $rootScope (don't know

why $scope doesn't work here). Fix UI bug
This commit is contained in:
Tyler Renelle 2014-05-12 12:18:53 -06:00
parent c2aed860db
commit 0dadc86a61
2 changed files with 1 additions and 4 deletions

View file

@ -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;
}

View file

@ -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')