Fix notification and validation messages when creating and importing a profile.
This commit is contained in:
parent
0060c9a0c9
commit
7f89772c86
5 changed files with 32 additions and 25 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, notification, pluginManager, identityService) {
|
||||
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, notification, pluginManager, identityService) {
|
||||
identityService.goWalletHome();
|
||||
|
||||
$scope.createProfile = function(form) {
|
||||
|
|
@ -17,7 +17,16 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
if (msg.indexOf('EEXIST')>=0 || msg.indexOf('BADC')>=0 ) {
|
||||
msg = 'This profile already exists'
|
||||
}
|
||||
$scope.error = msg;
|
||||
$timeout(function() {
|
||||
form.email.$setViewValue('');
|
||||
form.email.$render();
|
||||
form.password.$setViewValue('');
|
||||
form.password.$render();
|
||||
form.repeatpassword.$setViewValue('');
|
||||
form.repeatpassword.$render();
|
||||
form.$setPristine();
|
||||
$scope.error = msg;
|
||||
},1);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue