mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-10 09:59:48 +01:00
[SM-410] Fix boolean custom fields not working (#4386)
* Fix boolean custom fields not working
This commit is contained in:
parent
d3c780e079
commit
049940d04b
@ -81,8 +81,8 @@
|
|||||||
[(ngModel)]="f.value"
|
[(ngModel)]="f.value"
|
||||||
*ngIf="f.type === fieldType.Boolean"
|
*ngIf="f.type === fieldType.Boolean"
|
||||||
appTrueFalseValue
|
appTrueFalseValue
|
||||||
[trueValue]="true"
|
trueValue="true"
|
||||||
[falseValue]="false"
|
falseValue="false"
|
||||||
attr.aria-describedby="fieldName{{ i }}"
|
attr.aria-describedby="fieldName{{ i }}"
|
||||||
[readonly]="!cipher.edit && editMode"
|
[readonly]="!cipher.edit && editMode"
|
||||||
/>
|
/>
|
||||||
|
@ -79,8 +79,8 @@
|
|||||||
[(ngModel)]="f.value"
|
[(ngModel)]="f.value"
|
||||||
*ngIf="f.type === fieldType.Boolean"
|
*ngIf="f.type === fieldType.Boolean"
|
||||||
appTrueFalseValue
|
appTrueFalseValue
|
||||||
[trueValue]="true"
|
trueValue="true"
|
||||||
[falseValue]="false"
|
falseValue="false"
|
||||||
attr.aria-describedby="fieldName{{ i }}"
|
attr.aria-describedby="fieldName{{ i }}"
|
||||||
[readonly]="!cipher.edit && editMode"
|
[readonly]="!cipher.edit && editMode"
|
||||||
/>
|
/>
|
||||||
|
@ -122,8 +122,8 @@
|
|||||||
[(ngModel)]="f.value"
|
[(ngModel)]="f.value"
|
||||||
*ngIf="f.type === fieldType.Boolean"
|
*ngIf="f.type === fieldType.Boolean"
|
||||||
appTrueFalseValue
|
appTrueFalseValue
|
||||||
[trueValue]="true"
|
trueValue="true"
|
||||||
[falseValue]="false"
|
falseValue="false"
|
||||||
[disabled]="cipher.isDeleted || viewOnly"
|
[disabled]="cipher.isDeleted || viewOnly"
|
||||||
attr.aria-describedby="fieldName{{ i }}"
|
attr.aria-describedby="fieldName{{ i }}"
|
||||||
/>
|
/>
|
||||||
|
@ -13,8 +13,8 @@ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class TrueFalseValueDirective implements ControlValueAccessor {
|
export class TrueFalseValueDirective implements ControlValueAccessor {
|
||||||
@Input() trueValue = true;
|
@Input() trueValue: boolean | string = true;
|
||||||
@Input() falseValue = false;
|
@Input() falseValue: boolean | string = false;
|
||||||
|
|
||||||
constructor(private elementRef: ElementRef, private renderer: Renderer2) {}
|
constructor(private elementRef: ElementRef, private renderer: Renderer2) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user