fix: fixes to signup flow, fixes #9816

This commit is contained in:
Torkel Ödegaard
2018-02-20 13:39:16 +01:00
parent 69ccbffaed
commit dceac3aa71
4 changed files with 26 additions and 29 deletions
+1 -1
View File
@@ -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;