mirror of https://github.com/BTCPrivate/copay.git
WIP: password directive
This commit is contained in:
parent
abf552aa5c
commit
2021ea979c
|
@ -250,10 +250,7 @@ angular.module('copayApp.directives')
|
||||||
scope.$watch(attrs.ngModel, function(newValue, oldValue) {
|
scope.$watch(attrs.ngModel, function(newValue, oldValue) {
|
||||||
if (newValue && newValue !== '') {
|
if (newValue && newValue !== '') {
|
||||||
var info = evaluateMeter(newValue);
|
var info = evaluateMeter(newValue);
|
||||||
element.css({
|
scope[attrs.checkStrength] = info;
|
||||||
'border-color': info.color
|
|
||||||
});
|
|
||||||
scope[attrs.checkStrength] = info.message;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,10 +148,21 @@
|
||||||
|
|
||||||
<form ng-show="createStep == 'pass'" name="passForm" ng-submit="createProfile(passForm)" novalidate>
|
<form ng-show="createStep == 'pass'" name="passForm" ng-submit="createProfile(passForm)" novalidate>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input id="password" type="password" ng-model="$parent.password" class="form-control" name="password" placeholder="{{'Choose a password'|translate}}" check-strength="passwordStrength" tooltip-html-unsafe="Password strength: <b>{{passwordStrength}}</b><br/><span class='size-12'>Tip: Use lower and uppercase, numbers and symbols</span>" tooltip-trigger="focus" required tooltip-placement="top">
|
<input id="password" type="password" ng-model="$parent.password" class="form-control" name="password" placeholder="{{'Choose a password'|translate}}" check-strength="passwordStrength" >
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="box-notification" ng-show="passwordStrength">
|
||||||
|
<div class="box-icon" style="background-color:{{passwordStrength.color}}">
|
||||||
|
<i class="fi-x size-24"></i>
|
||||||
|
<i class="fi-x size-24"></i>
|
||||||
|
</div>
|
||||||
|
<span class="size-14" >
|
||||||
|
Password Strength: {{passwordStrength.message}}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="password" ng-model="repeatpassword" class="input form-control" name="repeatpassword" placeholder="{{'Repeat password'|translate}}" match="password" required>
|
<input type="password" ng-model="repeatpassword" class="input form-control" name="repeatpassword" placeholder="{{'Repeat password'|translate}}" match="password" required>
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
|
|
Loading…
Reference in New Issue