initial import for Open Source 🎉

This commit is contained in:
Jimmy Zelinskie 2019-11-12 11:09:47 -05:00
parent 1898c361f3
commit 9c0dd3b722
2048 changed files with 218743 additions and 0 deletions

View file

@ -0,0 +1,35 @@
/**
* An element which displays a box for the user to recover their account.
*/
angular.module('quay').directive('recoveryForm', function () {
var directiveDefinitionObject = {
priority: 0,
templateUrl: '/static/directives/recovery-form.html',
replace: false,
transclude: true,
restrict: 'C',
scope: {
},
controller: function($scope, $location, $timeout, ApiService, KeyService, UserService, Config, Features) {
$scope.Config = Config;
$scope.Features = Features;
$scope.sendRecovery = function() {
$scope.sendingRecovery = true;
ApiService.requestRecoveryEmail($scope.recovery).then(function(resp) {
$scope.invalidRecovery = false;
$scope.errorMessage = '';
$scope.sent = resp;
$scope.sendingRecovery = false;
}, function(resp) {
$scope.invalidRecovery = true;
$scope.errorMessage = ApiService.getErrorMessage(resp, 'Cannot send recovery email');
$scope.sent = null;
$scope.sendingRecovery = false;
});
};
}
};
return directiveDefinitionObject;
});