1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-22 11:45:59 +01:00

[SM-410] Fix boolean custom fields not working (#4386)

* Fix boolean custom fields not working
This commit is contained in:
Oscar Hinton 2023-01-05 16:50:19 +01:00 committed by GitHub
parent d3c780e079
commit 049940d04b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -81,8 +81,8 @@
[(ngModel)]="f.value"
*ngIf="f.type === fieldType.Boolean"
appTrueFalseValue
[trueValue]="true"
[falseValue]="false"
trueValue="true"
falseValue="false"
attr.aria-describedby="fieldName{{ i }}"
[readonly]="!cipher.edit && editMode"
/>

View File

@ -79,8 +79,8 @@
[(ngModel)]="f.value"
*ngIf="f.type === fieldType.Boolean"
appTrueFalseValue
[trueValue]="true"
[falseValue]="false"
trueValue="true"
falseValue="false"
attr.aria-describedby="fieldName{{ i }}"
[readonly]="!cipher.edit && editMode"
/>

View File

@ -122,8 +122,8 @@
[(ngModel)]="f.value"
*ngIf="f.type === fieldType.Boolean"
appTrueFalseValue
[trueValue]="true"
[falseValue]="false"
trueValue="true"
falseValue="false"
[disabled]="cipher.isDeleted || viewOnly"
attr.aria-describedby="fieldName{{ i }}"
/>

View File

@ -13,8 +13,8 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
],
})
export class TrueFalseValueDirective implements ControlValueAccessor {
@Input() trueValue = true;
@Input() falseValue = false;
@Input() trueValue: boolean | string = true;
@Input() falseValue: boolean | string = false;
constructor(private elementRef: ElementRef, private renderer: Renderer2) {}