use true false value directive for boolean field

This commit is contained in:
Kyle Spearrin 2018-06-06 14:30:26 -04:00
parent 5412a43509
commit 0fc5982f26
4 changed files with 6 additions and 5 deletions

2
jslib

@ -1 +1 @@
Subproject commit 22c12cf5c4cc1c00792a9717fbb3d85fc53bed99
Subproject commit a7a58ae8f306fad1f72110754ed9cccf19fee482

View File

@ -24,7 +24,6 @@
"@ngtools/webpack": "1.10.2",
"@types/chrome": "0.0.51",
"@types/jasmine": "^2.8.2",
"@types/jquery": "^3.2.16",
"@types/lunr": "2.1.5",
"@types/mousetrap": "^1.6.0",
"@types/node": "8.0.19",
@ -68,8 +67,7 @@
"tslint": "^5.9.1",
"tslint-loader": "^3.5.3",
"typescript": "^2.7.1",
"webpack": "^3.10.0",
"webpack-merge": "^4.1.0"
"webpack": "^3.10.0"
},
"dependencies": {
"@angular/animations": "5.2.0",

View File

@ -49,6 +49,7 @@ import { FallbackSrcDirective } from 'jslib/angular/directives/fallback-src.dire
import { InputVerbatimDirective } from 'jslib/angular/directives/input-verbatim.directive';
import { StopClickDirective } from 'jslib/angular/directives/stop-click.directive';
import { StopPropDirective } from 'jslib/angular/directives/stop-prop.directive';
import { TrueFalseValueDirective } from 'jslib/angular/directives/true-false-value.directive';
import { I18nPipe } from 'jslib/angular/pipes/i18n.pipe';
import { SearchCiphersPipe } from 'jslib/angular/pipes/search-ciphers.pipe';
@ -112,6 +113,7 @@ import { IconComponent } from 'jslib/angular/components/icon.component';
StopPropDirective,
SyncComponent,
TabsComponent,
TrueFalseValueDirective,
TwoFactorOptionsComponent,
TwoFactorComponent,
ViewComponent,

View File

@ -285,7 +285,8 @@
*ngIf="f.type === fieldType.Hidden" placeholder="{{'value' | i18n}}">
</div>
<input id="fieldValue{{i}}" name="Field.Value{{i}}" type="checkbox"
[(ngModel)]="f.value" *ngIf="f.type === fieldType.Boolean">
[(ngModel)]="f.value" *ngIf="f.type === fieldType.Boolean"
appTrueFalseValue trueValue="true" falseValue="false">
<div class="action-buttons" *ngIf="f.type === fieldType.Hidden">
<a class="row-btn" href="#" appStopClick appBlurClick
title="{{'toggleVisibility' | i18n}}" (click)="toggleFieldValue(f)">