bwc
This commit is contained in:
parent
04fb7ba032
commit
320de62f13
348 changed files with 7745 additions and 30874 deletions
41
src/js/controllers/password.js
Normal file
41
src/js/controllers/password.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('passwordController',
|
||||
function($rootScope, $scope, $timeout, profileService, notification, go) {
|
||||
|
||||
var self = this;
|
||||
|
||||
var pass1;
|
||||
|
||||
self.isVerification = false;
|
||||
|
||||
self.close = function(cb){
|
||||
return cb('No password given');
|
||||
};
|
||||
|
||||
self.set = function(isSetup, cb){
|
||||
self.error = false;
|
||||
|
||||
if (isSetup && !self.isVerification) {
|
||||
self.isVerification = true;
|
||||
pass1= self.password;
|
||||
self.password = null;
|
||||
$timeout(function(){
|
||||
$rootScope.$apply();
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (isSetup) {
|
||||
if (pass1 != self.password) {
|
||||
self.error = 'Passwords do not match';
|
||||
self.isVerification = false;
|
||||
self.password = null;
|
||||
pass1 =null;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
return cb(null, self.password);
|
||||
};
|
||||
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue