mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-25 16:59:17 +01:00
return state for org create on register/login
This commit is contained in:
parent
c69169cbf9
commit
5c471e43dd
@ -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 = {
|
||||
|
@ -6,7 +6,16 @@ angular
|
||||
var params = $location.search();
|
||||
var stateParams = $state.params;
|
||||
|
||||
$scope.returnState = $state.params.returnState;
|
||||
if (!stateParams.returnState && stateParams.org) {
|
||||
$scope.returnState = {
|
||||
name: 'backend.user.settingsCreateOrg',
|
||||
params: { plan: $state.params.org }
|
||||
};
|
||||
}
|
||||
else {
|
||||
$scope.returnState = stateParams.returnState;
|
||||
}
|
||||
|
||||
$scope.success = false;
|
||||
$scope.model = {
|
||||
email: params.email ? params.email : stateParams.email
|
||||
|
@ -185,7 +185,7 @@ angular
|
||||
}
|
||||
})
|
||||
.state('frontend.login.info', {
|
||||
url: '^/',
|
||||
url: '^/?org',
|
||||
templateUrl: 'app/accounts/views/accountsLoginInfo.html',
|
||||
data: {
|
||||
pageTitle: 'Log In'
|
||||
@ -225,7 +225,7 @@ angular
|
||||
}
|
||||
})
|
||||
.state('frontend.register', {
|
||||
url: '^/register',
|
||||
url: '^/register?org',
|
||||
templateUrl: 'app/accounts/views/accountsRegister.html',
|
||||
controller: 'accountsRegisterController',
|
||||
params: {
|
||||
|
Loading…
Reference in New Issue
Block a user