org name from mail invite link

This commit is contained in:
Kyle Spearrin 2017-03-29 20:58:27 -04:00
parent af2f7a7a5a
commit 916519a43a
3 changed files with 10 additions and 13 deletions

View File

@ -7,7 +7,8 @@ angular
params: $state.params params: $state.params
}; };
if (!$state.params.organizationId || !$state.params.organizationUserId || !$state.params.token || !$state.params.email) { if (!$state.params.organizationId || !$state.params.organizationUserId || !$state.params.token ||
!$state.params.email || !$state.params.organizationName) {
$state.go('frontend.login.info').then(function () { $state.go('frontend.login.info').then(function () {
toastr.error('Invalid parameters.'); toastr.error('Invalid parameters.');
}); });

View File

@ -10,25 +10,21 @@
Accepting invitation... Accepting invitation...
</div> </div>
<div ng-show="!loading && !accepting"> <div ng-show="!loading && !accepting">
<p class="login-box-msg">Join Organization</p> <p class="login-box-msg">Join {{state.params.organizationName}}</p>
<p class="text-center"><strong>{{state.params.email}}</strong></p> <p class="text-center"><strong>{{state.params.email}}</strong></p>
<p> <p>
You've been invited to join the an organization. To accept the invitation, you need to log in or You've been invited to join the organization listed above.
create a new bitwarden account. To accept the invitation, you need to log in or create a new bitwarden account.
</p> </p>
<hr /> <hr />
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<p> <a ui-sref="frontend.login.info({returnState: state, email: state.params.email})"
<a ui-sref="frontend.login.info({returnState: state, email: state.params.email})" class="btn btn-primary btn-block btn-flat">Log In</a>
class="btn btn-primary btn-block btn-flat">Log In</a>
</p>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<p> <a ui-sref="frontend.register({returnState: state, email: state.params.email})"
<a ui-sref="frontend.register({returnState: state, email: state.params.email})" class="btn btn-primary btn-block btn-flat">Create Account</a>
class="btn btn-primary btn-block btn-flat">Create Account</a>
</p>
</div> </div>
</div> </div>
</div> </div>

View File

@ -211,7 +211,7 @@ angular
} }
}) })
.state('frontend.organizationAccept', { .state('frontend.organizationAccept', {
url: '^/accept-organization?organizationId&organizationUserId&token&email', url: '^/accept-organization?organizationId&organizationUserId&token&email&organizationName',
templateUrl: 'app/accounts/views/accountsOrganizationAccept.html', templateUrl: 'app/accounts/views/accountsOrganizationAccept.html',
controller: 'accountsOrganizationAcceptController', controller: 'accountsOrganizationAcceptController',
data: { data: {