From 049940d04b0e7d05148d76746df85ed2ce8ca8e4 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 5 Jan 2023 16:50:19 +0100 Subject: [PATCH] [SM-410] Fix boolean custom fields not working (#4386) * Fix boolean custom fields not working --- .../src/popup/vault/add-edit-custom-fields.component.html | 4 ++-- .../src/app/vault/add-edit-custom-fields.component.html | 4 ++-- apps/web/src/app/vault/add-edit-custom-fields.component.html | 4 ++-- libs/angular/src/directives/true-false-value.directive.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/browser/src/popup/vault/add-edit-custom-fields.component.html b/apps/browser/src/popup/vault/add-edit-custom-fields.component.html index 42200f72fa..8464655c20 100644 --- a/apps/browser/src/popup/vault/add-edit-custom-fields.component.html +++ b/apps/browser/src/popup/vault/add-edit-custom-fields.component.html @@ -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" /> diff --git a/apps/desktop/src/app/vault/add-edit-custom-fields.component.html b/apps/desktop/src/app/vault/add-edit-custom-fields.component.html index a5cfefdcec..c7efaad70b 100644 --- a/apps/desktop/src/app/vault/add-edit-custom-fields.component.html +++ b/apps/desktop/src/app/vault/add-edit-custom-fields.component.html @@ -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" /> diff --git a/apps/web/src/app/vault/add-edit-custom-fields.component.html b/apps/web/src/app/vault/add-edit-custom-fields.component.html index e01360562f..c524f34641 100644 --- a/apps/web/src/app/vault/add-edit-custom-fields.component.html +++ b/apps/web/src/app/vault/add-edit-custom-fields.component.html @@ -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 }}" /> diff --git a/libs/angular/src/directives/true-false-value.directive.ts b/libs/angular/src/directives/true-false-value.directive.ts index 9e35e77ea5..c769753986 100644 --- a/libs/angular/src/directives/true-false-value.directive.ts +++ b/libs/angular/src/directives/true-false-value.directive.ts @@ -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) {}