Better UX when recovering organization emails

Fixes #291
This commit is contained in:
Joseph Schorr 2015-12-28 15:25:31 -05:00
parent 16f16e8a15
commit 31a8a0fba4
7 changed files with 76 additions and 11 deletions

View file

@ -24,15 +24,15 @@ angular.module('quay').directive('userSetup', function () {
$scope.sendRecovery = function() {
$scope.sendingRecovery = true;
ApiService.requestRecoveryEmail($scope.recovery).then(function() {
ApiService.requestRecoveryEmail($scope.recovery).then(function(resp) {
$scope.invalidRecovery = false;
$scope.errorMessage = '';
$scope.sent = true;
$scope.sent = resp;
$scope.sendingRecovery = false;
}, function(resp) {
$scope.invalidRecovery = true;
$scope.errorMessage = ApiService.getErrorMessage(resp, 'Cannot send recovery email');
$scope.sent = false;
$scope.sent = null;
$scope.sendingRecovery = false;
});
};