mirror of https://github.com/BTCPrivate/copay.git
password confirmation when joining and creating a wallet
This commit is contained in:
parent
4f57c3f696
commit
b51e8b3539
|
@ -540,4 +540,8 @@ button[disabled].warning:focus,
|
||||||
height: 50px;
|
height: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input.ng-invalid-match, input.ng-invalid-match:focus {
|
||||||
|
border-color: red;
|
||||||
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------------*/
|
/*-----------------------------------------------------------------*/
|
||||||
|
|
|
@ -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);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})
|
||||||
;
|
;
|
||||||
|
|
|
@ -21,12 +21,21 @@
|
||||||
<label>Your Wallet Password <small data-options="disable_for_touch:true" class="has-tip" tooltip="doesn't need to be shared">Required</small>
|
<label>Your Wallet Password <small data-options="disable_for_touch:true" class="has-tip" tooltip="doesn't need to be shared">Required</small>
|
||||||
<input type="password" placeholder="Choose your password" class="form-control"
|
<input type="password" placeholder="Choose your password" class="form-control"
|
||||||
ng-model="$parent.walletPassword"
|
ng-model="$parent.walletPassword"
|
||||||
|
name="walletPassword"
|
||||||
check-strength="passwordStrength"
|
check-strength="passwordStrength"
|
||||||
tooltip-html-unsafe="Password strength:
|
tooltip-html-unsafe="Password strength:
|
||||||
<i>{{passwordStrength}}</i><br/><span
|
<i>{{passwordStrength}}</i><br/><span
|
||||||
class='size-12'>Tip: Use lower and uppercase, numbers and
|
class='size-12'>Tip: Use lower and uppercase, numbers and
|
||||||
symbols</span>"
|
symbols</span>"
|
||||||
tooltip-trigger="focus" required>
|
tooltip-trigger="focus" required>
|
||||||
|
|
||||||
|
<input type="password"
|
||||||
|
placeholder="Repeat password"
|
||||||
|
name="walletPasswordConfirm"
|
||||||
|
ng-model="walletPasswordConfirm"
|
||||||
|
match="walletPassword"
|
||||||
|
required>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,6 +34,13 @@
|
||||||
tooltip-html-unsafe="Password strength:
|
tooltip-html-unsafe="Password strength:
|
||||||
<i>{{passwordStrength}}</i><br/><span class='size-12'>Tip: Use lower and uppercase,
|
<i>{{passwordStrength}}</i><br/><span class='size-12'>Tip: Use lower and uppercase,
|
||||||
numbers and symbols</span>" tooltip-trigger="focus" required>
|
numbers and symbols</span>" tooltip-trigger="focus" required>
|
||||||
|
|
||||||
|
<input type="password"
|
||||||
|
placeholder="Repeat password"
|
||||||
|
name="joinPasswordConfirm"
|
||||||
|
ng-model="joinPasswordConfirm"
|
||||||
|
match="joinPassword" required>
|
||||||
|
|
||||||
<a class="back-button" ng-click="backWallet()">« Back</a>
|
<a class="back-button" ng-click="backWallet()">« Back</a>
|
||||||
<button type="submit" class="button primary radius" ng-disabled="joinForm.$invalid || loading" loading="Joining">Join</button>
|
<button type="submit" class="button primary radius" ng-disabled="joinForm.$invalid || loading" loading="Joining">Join</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in New Issue