From 7044cbd4be5fb7aac94bb36fc83ac0d123688e95 Mon Sep 17 00:00:00 2001 From: FrancescoMolinaro Date: Thu, 24 Oct 2024 16:52:02 +0200 Subject: [PATCH 1/2] [CST-15396] fix method for error reset in non mandatory groups --- .../ds-dynamic-form-control-container.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index 9491e06314f..4aa96cda897 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -583,8 +583,9 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo isNotRequiredGroupAndEmpty(): boolean { const parent = this.model.parent; - - if (hasValue(parent) && parent.type === 'GROUP') { + // Check if the model is part of a group, the group needs to be an inner form and be in the submission form not in a nested form. + // The check hasValue(parent.parent) tells if the parent is in the submission or in a modal (nested cases) + if (hasValue(parent) && parent.type === 'GROUP' && this.model.isModelOfInnerForm && hasValue(parent.parent)) { const groupHasSomeValue = parent.group.some(elem => !!elem.value); From c6a4da7944c97db31eaa00c202b55ca107b4392e Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 24 Oct 2024 18:12:02 +0200 Subject: [PATCH 2/2] [DSC-1994] Show error class for check-boxes and radio-boxes --- .../ds-dynamic-form-ui/models/list/dynamic-list.component.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html index 5c88af76bcc..bf612ee469a 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.html @@ -14,6 +14,7 @@ [attr.aria-labelledby]="'label_' + model.id" [attr.tabindex]="item.index" [checked]="item.value" + [class.is-invalid]="showErrorMessages" [id]="model.id + item.id" [formControlName]="item.id" [name]="model.name" @@ -46,6 +47,7 @@