UI tweaks for org invites
This commit is contained in:
parent
4d2cae0b0f
commit
e12582c2c2
|
@ -5,10 +5,10 @@ angular
|
|||
$state, appSettings, $analytics) {
|
||||
var returnState = $state.params.returnState;
|
||||
var rememberedEmail = $cookies.get(appSettings.rememberedEmailCookieName);
|
||||
if (rememberedEmail) {
|
||||
if (rememberedEmail || $state.params.email) {
|
||||
$scope.model = {
|
||||
email: rememberedEmail,
|
||||
rememberEmail: true
|
||||
email: $state.params.email ? $state.params.email : rememberedEmail,
|
||||
rememberEmail: rememberedEmail !== null
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ angular
|
|||
params: $state.params
|
||||
};
|
||||
|
||||
if (!$state.params.organizationId || !$state.params.organizationUserId || !$state.params.token) {
|
||||
if (!$state.params.organizationId || !$state.params.organizationUserId || !$state.params.token || !$state.params.email) {
|
||||
$state.go('frontend.login.info').then(function () {
|
||||
toastr.error('Invalid parameters.');
|
||||
});
|
||||
|
|
|
@ -4,12 +4,14 @@ angular
|
|||
.controller('accountsRegisterController', function ($scope, $location, apiService, cryptoService, validationService,
|
||||
$analytics, $state) {
|
||||
var params = $location.search();
|
||||
var stateParams = $state.params;
|
||||
|
||||
$scope.returnState = $state.params.returnState;
|
||||
$scope.success = false;
|
||||
$scope.model = {
|
||||
email: params.email
|
||||
email: params.email ? params.email : stateParams.email
|
||||
};
|
||||
$scope.readOnlyEmail = stateParams.email !== null;
|
||||
|
||||
$scope.registerPromise = null;
|
||||
$scope.register = function (form) {
|
||||
|
|
|
@ -11,17 +11,24 @@
|
|||
</div>
|
||||
<div ng-show="!loading && !accepting">
|
||||
<p class="login-box-msg">Join Organization</p>
|
||||
<p class="text-center"><strong>{{state.params.email}}</strong></p>
|
||||
<p>
|
||||
You've been invited to join the ____ organization. To accept the invitation, you need to log in or
|
||||
You've been invited to join the an organization. To accept the invitation, you need to log in or
|
||||
create a new bitwarden account.
|
||||
</p>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p><a ui-sref="frontend.login.info({returnState: state})" class="btn btn-primary btn-block btn-flat">Log In</a></p>
|
||||
<p>
|
||||
<a ui-sref="frontend.login.info({returnState: state, email: state.params.email})"
|
||||
class="btn btn-primary btn-block btn-flat">Log In</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<p><a ui-sref="frontend.register({returnState: state})" class="btn btn-primary btn-block btn-flat">Create Account</a></p>
|
||||
<p>
|
||||
<a ui-sref="frontend.register({returnState: state, email: state.params.email})"
|
||||
class="btn btn-primary btn-block btn-flat">Create Account</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<div class="form-group has-feedback" show-errors>
|
||||
<label for="email" class="sr-only">Email</label>
|
||||
<input type="email" id="email" name="Email" class="form-control" placeholder="Email" ng-model="model.email"
|
||||
required api-field />
|
||||
ng-readonly="readOnlyEmail" required api-field />
|
||||
<span class="fa fa-envelope form-control-feedback"></span>
|
||||
<p class="help-block">You'll use your email address to log in.</p>
|
||||
</div>
|
||||
|
|
|
@ -150,7 +150,8 @@ angular
|
|||
templateUrl: 'app/accounts/views/accountsLogin.html',
|
||||
controller: 'accountsLoginController',
|
||||
params: {
|
||||
returnState: null
|
||||
returnState: null,
|
||||
email: null
|
||||
},
|
||||
data: {
|
||||
bodyClass: 'login-page'
|
||||
|
@ -201,7 +202,8 @@ angular
|
|||
templateUrl: 'app/accounts/views/accountsRegister.html',
|
||||
controller: 'accountsRegisterController',
|
||||
params: {
|
||||
returnState: null
|
||||
returnState: null,
|
||||
email: null
|
||||
},
|
||||
data: {
|
||||
pageTitle: 'Register',
|
||||
|
@ -209,7 +211,7 @@ angular
|
|||
}
|
||||
})
|
||||
.state('frontend.organizationAccept', {
|
||||
url: '^/accept-organization?organizationId&organizationUserId&token',
|
||||
url: '^/accept-organization?organizationId&organizationUserId&token&email',
|
||||
templateUrl: 'app/accounts/views/accountsOrganizationAccept.html',
|
||||
controller: 'accountsOrganizationAcceptController',
|
||||
data: {
|
||||
|
|
|
@ -19,35 +19,45 @@
|
|||
Loading...
|
||||
</div>
|
||||
<div class="table-responsive" ng-show="users.length">
|
||||
<table class="table table-striped table-hover">
|
||||
<table class="table table-striped table-hover table-vmiddle">
|
||||
<tbody>
|
||||
<tr ng-repeat="user in users | orderBy: ['name', 'email']">
|
||||
<td style="width: 70px;" valign="middle">
|
||||
<td style="width: 70px;">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-cog"></i> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-click="confirm(user)">Confirm</a>
|
||||
<li ng-show="user.status === 1">
|
||||
<a href="javascript:void(0)" ng-click="confirm(user)">
|
||||
<i class="fa fa-fw fa-check"></i> Confirm
|
||||
</a>
|
||||
</li>
|
||||
<li ng-show="user.status === 0">
|
||||
<a href="javascript:void(0)" ng-click="reinvite(user)">
|
||||
<i class="fa fa-fw fa-envelope-o"></i> Re-send Invitation
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="javascript:void(0)" ng-click="delete(user)" class="text-red">
|
||||
<i class="fa fa-fw fa-remove"></i> Remove
|
||||
</a>
|
||||
</li>
|
||||
<li><a href="javascript:void(0)" ng-click="reinvite(user)">Re-send Invitation</a></li>
|
||||
<li><a href="javascript:void(0)" ng-click="delete(user)" class="text-danger">Remove</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width: 45px;" valign="middle">
|
||||
<td style="width: 45px;">
|
||||
<img src="//www.gravatar.com/avatar/{{user.email | gravatar}}.jpg?s=45&d=mm"
|
||||
class="img-circle" alt="User Image">
|
||||
</td>
|
||||
<td valign="middle">
|
||||
<td>
|
||||
<a href="javascript:void(0)" ng-click="edit(user.id)">{{user.email}}</a>
|
||||
<div ng-if="user.name"><small class="text-muted">{{user.name}}</small></div>
|
||||
</td>
|
||||
<td style="width: 100px;" valign="middle">
|
||||
<td style="width: 100px;">
|
||||
{{user.typeName}}
|
||||
</td>
|
||||
<td style="width: 100px;" valign="middle">
|
||||
<td style="width: 100px;">
|
||||
{{user.statusName}}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -113,6 +113,15 @@ form .btn .loading-icon {
|
|||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
border-color: #ccc;
|
||||
|
||||
> li > a > .fa {
|
||||
margin-right: 0;
|
||||
margin-left: -5px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Modals */
|
||||
|
||||
.modal-footer {
|
||||
|
@ -131,6 +140,10 @@ form .btn .loading-icon {
|
|||
}
|
||||
}
|
||||
|
||||
.table-vmiddle td {
|
||||
vertical-align: middle !important;
|
||||
}
|
||||
|
||||
/* Callouts */
|
||||
|
||||
.callout.callout-default {
|
||||
|
@ -244,6 +257,12 @@ form .btn .loading-icon {
|
|||
}
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Misc */
|
||||
|
||||
.strike {
|
||||
|
|
Loading…
Reference in New Issue