Enforce Passphrase Policy (#1172)

* Update jslib (44b86f5 -> 36241e9) and initial commit of passphrase policy

* Reverted string changes - updated number of words event trigger

* Update input event to blur to match other number fields

* Update jslib (36241e9 -> 0a30c7e)

Co-authored-by: Vincent Salucci <vsalucci@bitwarden.com>
This commit is contained in:
Vincent Salucci 2020-03-12 17:52:14 -05:00 committed by GitHub
parent 0241b9da11
commit c6b0898213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

2
jslib

@ -1 +1 @@
Subproject commit 44b86f5dd028271059b70a00d7878fbb1a06023f
Subproject commit 0a30c7eb1ecbac500e6c55a7d4024d98efa982bc

View File

@ -11,7 +11,7 @@
</div>
</header>
<content>
<app-callout type="info" *ngIf="policyInEffect">
<app-callout type="info" *ngIf="enforcedPolicyOptions?.inEffect()">
{{'passwordGeneratorPolicyInEffect' | i18n}}
</app-callout>
<div class="password-block">
@ -51,7 +51,7 @@
<div class="box-content">
<div class="box-content-row box-content-row-input" appBoxRow>
<label for="num-words">{{'numWords' | i18n}}</label>
<input id="num-words" type="number" min="3" max="20" (input)="saveOptions()"
<input id="num-words" type="number" min="3" max="20" (blur)="saveOptions()"
[(ngModel)]="options.numWords">
</div>
<div class="box-content-row box-content-row-input" appBoxRow>
@ -61,11 +61,13 @@
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="capitalize">{{'capitalize' | i18n}}</label>
<input id="capitalize" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.capitalize">
<input id="capitalize" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.capitalize"
[disabled]="enforcedPolicyOptions?.capitalize">
</div>
<div class="box-content-row box-content-row-checkbox" appBoxRow>
<label for="include-number">{{'includeNumber' | i18n}}</label>
<input id="include-number" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.includeNumber">
<input id="include-number" type="checkbox" (change)="saveOptions()" [(ngModel)]="options.includeNumber"
[disabled]="enforcedPolicyOptions?.includeNumber">
</div>
</div>
</div>