2014-09-30 21:16:46 -03:00
|
|
|
'use strict';
|
|
|
|
|
|
2014-10-24 11:37:03 -03:00
|
|
|
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, notification, controllerUtils, pluginManager, identityService) {
|
2014-09-30 21:16:46 -03:00
|
|
|
controllerUtils.redirIfLogged();
|
2014-10-30 16:13:56 -03:00
|
|
|
$scope.retreiving = false;
|
2014-09-30 21:16:46 -03:00
|
|
|
|
|
|
|
|
$scope.createProfile = function(form) {
|
2014-10-09 18:53:31 -03:00
|
|
|
if (form && form.$invalid) {
|
|
|
|
|
notification.error('Error', 'Please enter the required fields');
|
|
|
|
|
return;
|
|
|
|
|
}
|
2014-09-30 21:16:46 -03:00
|
|
|
$scope.loading = true;
|
2014-10-24 11:58:22 -03:00
|
|
|
identityService.create($scope, form);
|
2014-09-30 21:16:46 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|