password confirmation when joining and creating a wallet

This commit is contained in:
Gustavo Maximiliano Cortez 2014-07-18 17:56:50 -03:00
commit b51e8b3539
4 changed files with 36 additions and 0 deletions

View file

@ -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);
});
}
};
})
;