From 283050e15964b0076b8ce2d953563ca2e45ae4a2 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Sun, 27 Apr 2014 16:35:48 -0400 Subject: [PATCH] Fix bug in creating organizations --- static/js/controllers.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index ff7d4e354..ad97a6042 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -2335,10 +2335,10 @@ function NewOrgCtrl($scope, $routeParams, $timeout, $location, UserService, Plan // Load the list of plans. PlanService.getPlans(function(plans) { $scope.plans = plans; - $scope.currentPlan = null; + $scope.holder.currentPlan = null; if (requested) { 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.currentPlan = plan; + $scope.holder.currentPlan = plan; }; $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 (!Features.BILLING || $scope.currentPlan.price == 0) { + if (!Features.BILLING || $scope.holder.currentPlan.price == 0) { showOrg(); return; } @@ -2401,7 +2401,7 @@ function NewOrgCtrl($scope, $routeParams, $timeout, $location, UserService, Plan 'failure': showOrg }; - PlanService.changePlan($scope, org.name, $scope.currentPlan.stripeId, callbacks); + PlanService.changePlan($scope, org.name, $scope.holder.currentPlan.stripeId, callbacks); }, function(result) { $scope.creating = false; $scope.createError = result.data.message || result.data;