Fix bug in creating organizations
This commit is contained in:
parent
97b3a72260
commit
283050e159
1 changed files with 5 additions and 5 deletions
|
@ -2335,10 +2335,10 @@ function NewOrgCtrl($scope, $routeParams, $timeout, $location, UserService, Plan
|
||||||
// Load the list of plans.
|
// Load the list of plans.
|
||||||
PlanService.getPlans(function(plans) {
|
PlanService.getPlans(function(plans) {
|
||||||
$scope.plans = plans;
|
$scope.plans = plans;
|
||||||
$scope.currentPlan = null;
|
$scope.holder.currentPlan = null;
|
||||||
if (requested) {
|
if (requested) {
|
||||||
PlanService.getPlan(requested, function(plan) {
|
PlanService.getPlan(requested, function(plan) {
|
||||||
$scope.currentPlan = plan;
|
$scope.holder.currentPlan = plan;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -2359,7 +2359,7 @@ function NewOrgCtrl($scope, $routeParams, $timeout, $location, UserService, Plan
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.setPlan = function(plan) {
|
$scope.setPlan = function(plan) {
|
||||||
$scope.currentPlan = plan;
|
$scope.holder.currentPlan = plan;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.createNewOrg = function() {
|
$scope.createNewOrg = function() {
|
||||||
|
@ -2387,7 +2387,7 @@ function NewOrgCtrl($scope, $routeParams, $timeout, $location, UserService, Plan
|
||||||
};
|
};
|
||||||
|
|
||||||
// If the selected plan is free, simply move to the org page.
|
// If the selected plan is free, simply move to the org page.
|
||||||
if (!Features.BILLING || $scope.currentPlan.price == 0) {
|
if (!Features.BILLING || $scope.holder.currentPlan.price == 0) {
|
||||||
showOrg();
|
showOrg();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2401,7 +2401,7 @@ function NewOrgCtrl($scope, $routeParams, $timeout, $location, UserService, Plan
|
||||||
'failure': showOrg
|
'failure': showOrg
|
||||||
};
|
};
|
||||||
|
|
||||||
PlanService.changePlan($scope, org.name, $scope.currentPlan.stripeId, callbacks);
|
PlanService.changePlan($scope, org.name, $scope.holder.currentPlan.stripeId, callbacks);
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
$scope.creating = false;
|
$scope.creating = false;
|
||||||
$scope.createError = result.data.message || result.data;
|
$scope.createError = result.data.message || result.data;
|
||||||
|
|
Reference in a new issue