password confirmation when joining and creating a wallet
This commit is contained in:
parent
4f57c3f696
commit
b51e8b3539
4 changed files with 36 additions and 0 deletions
|
|
@ -236,4 +236,20 @@ angular.module('copayApp.directives')
|
|||
}
|
||||
])
|
||||
|
||||
.directive('match', function () {
|
||||
return {
|
||||
require: 'ngModel',
|
||||
restrict: 'A',
|
||||
scope: {
|
||||
match: '='
|
||||
},
|
||||
link: function(scope, elem, attrs, ctrl) {
|
||||
scope.$watch(function() {
|
||||
return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || scope.match === ctrl.$modelValue;
|
||||
}, function(currentValue) {
|
||||
ctrl.$setValidity('match', currentValue);
|
||||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue