Switch to using a common directive for user setup (sign in, sign up, recover account) everywhere

This commit is contained in:
Joseph Schorr 2013-12-11 18:20:24 -05:00
parent abe6db334d
commit 9dbbd33afc
6 changed files with 105 additions and 87 deletions

View file

@ -16,16 +16,6 @@ $.fn.clipboardCopy = function() {
};
function SigninCtrl($scope, $location, $timeout, Restangular, KeyService, UserService) {
$scope.sendRecovery = function() {
var signinPost = Restangular.one('recovery');
signinPost.customPOST($scope.recovery).then(function() {
$scope.invalidEmail = false;
$scope.sent = true;
}, function(result) {
$scope.invalidEmail = true;
$scope.sent = false;
});
};
};
function PlansCtrl($scope, $location, UserService, PlanService) {
@ -40,8 +30,11 @@ function PlansCtrl($scope, $location, UserService, PlanService) {
$scope.signedIn = function() {
$('#signinModal').modal('hide');
PlanService.handleNotedPlan();
PlanService.handleNotedPlan();
};
$scope.cancelNotedPlan = function() {
PlanService.notePlan('');
};
$scope.buyNow = function(plan) {