Commit dceac3aa by Torkel Ödegaard

fix: fixes to signup flow, fixes #9816

parent 69ccbffa
......@@ -12,7 +12,7 @@ export class InvitedCtrl {
icon: 'gicon gicon-branding',
text: 'Invite',
subTitle: 'Register your Grafana account',
breadcrumbs: [{ title: 'Login', url: '/login' }],
breadcrumbs: [{ title: 'Login', url: 'login' }],
},
};
......
......@@ -10,6 +10,13 @@ export class SignUpCtrl {
$scope.formModel = {};
var params = $location.search();
// validate email is semi ok
if (params.email && !params.email.match(/^\S+@\S+$/)) {
console.log('invalid email');
return;
}
$scope.formModel.orgName = params.email;
$scope.formModel.email = params.email;
$scope.formModel.username = params.email;
......
<div class="container">
<page-header model="navModel"></page-header>
<div class="signup-page-background">
</div>
<div class="login-content">
<div class="login-branding">
<img src="img/logo_transparent_200x75.png">
</div>
<div class="page-container page-body">
<div class="invite-box">
<h3>
<i class="fa fa-users"></i>&nbsp;
Change active organization
</h3>
<div class="signup">
<div class="login-form">
<div class="modal-tagline">
You have been added to another Organization <br>
due to an open invitation!
<br><br>
You have been added to another Organization due to an open invitation!
Please select which organization you want to <br>
use right now (you can change this later at any time).
</div>
<div style="display: inline-block; width: 400px; margin: 30px 0">
<table class="filter-table">
<tr ng-repeat="org in orgs">
<td class="nobg max-width-btns">
<a ng-click="setUsingOrg(org)" class="btn btn-inverse">
<div ng-repeat="org in orgs">
<a ng-click="setUsingOrg(org)" class="btn btn-success">
{{org.name}} ({{org.role}})
</a>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
......@@ -6,6 +6,14 @@ export class SelectOrgCtrl {
constructor($scope, backendSrv, contextSrv) {
contextSrv.sidemenu = false;
$scope.navModel = {
main: {
icon: 'gicon gicon-branding',
subTitle: 'Preferences',
text: 'Select active organization',
},
};
$scope.init = function() {
$scope.getUserOrgs();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment