Skip to content

Commit e22f807

Browse files
[DURACOM-444] make duplicate optional, add comments, refactor, fix group style issue, fix group modal tests
1 parent 4b7ce8e commit e22f807

12 files changed

Lines changed: 501 additions & 316 deletions

config/config.example.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,9 @@ form:
164164
validatorMap:
165165
required: required
166166
regex: pattern
167+
# If true it enables the button "Duplicate" inside inline form groups.
168+
# The button will give the possibility to duplicate the whole form section copying the metadata values as well.
169+
showInlineGroupDuplicateButton: false
167170

168171
# Notification settings
169172
notifications:
@@ -202,6 +205,10 @@ submission:
202205
# default configuration
203206
- name: default
204207
style: ''
208+
# Icons that should remain visible even when no authority value is present for the metadata field.
209+
# This is useful for fields where you want to display an icon regardless of whether the value has an authority link.
210+
# Example: ['fas fa-user'] will show the user icon for author fields even without authority data.
211+
iconsVisibleWithNoAuthority: ['fas fa-user']
205212
authority:
206213
confidence:
207214
# NOTE: example of configuration

src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,10 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
517517

518518
}
519519

520+
/**
521+
* Determines whether a form field should be validated based on its parent group's state.
522+
* @returns {boolean} True if the field should be validated, false otherwise
523+
*/
520524
isNotRequiredGroupAndEmpty(): boolean {
521525
const parent = this.model.parent;
522526
// 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.

0 commit comments

Comments
 (0)