1
0
mirror of https://github.com/bitwarden/web synced 2025-12-14 23:33:16 +00:00

return state for org create on register/login

This commit is contained in:
Kyle Spearrin
2017-04-25 10:46:54 -04:00
parent c69169cbf9
commit 5c471e43dd
3 changed files with 24 additions and 4 deletions

View File

@@ -4,7 +4,18 @@ angular
.controller('accountsLoginController', function ($scope, $rootScope, $cookies, apiService, cryptoService, authService,
$state, constants, $analytics) {
$scope.state = $state;
var returnState = $state.params.returnState;
var returnState;
if (!$state.params.returnState && $state.params.org) {
returnState = {
name: 'backend.user.settingsCreateOrg',
params: { plan: $state.params.org }
};
}
else {
returnState = $state.params.returnState;
}
var rememberedEmail = $cookies.get(constants.rememberedEmailCookieName);
if (rememberedEmail || $state.params.email) {
$scope.model = {