Better messaging when creating a user on the landing page

Fixes #230
This commit is contained in:
Joseph Schorr 2015-07-14 14:00:29 +03:00
parent 9453d67c32
commit 634190d1f9
6 changed files with 28 additions and 12 deletions

View file

@ -10,7 +10,7 @@ angular.module('quay').directive('signupForm', function () {
restrict: 'C',
scope: {
'inviteCode': '=inviteCode',
'hideRegisteredMessage': '@hideRegisteredMessage',
'userRegistered': '&userRegistered'
},
controller: function($scope, $location, $timeout, ApiService, KeyService, UserService, Config, UIService) {
@ -35,11 +35,11 @@ angular.module('quay').directive('signupForm', function () {
mixpanel.alias($scope.newUser.username);
}
$scope.userRegistered({'username': $scope.newUser.username});
if (!$scope.awaitingConfirmation) {
document.location = '/';
}
$scope.userRegistered({'username': $scope.newUser.username});
}, function(result) {
$scope.registering = false;
UIService.showFormError('#signupButton', result);