1 <cd-modal [modalRef]=
"activeModal">
2 <ng-container *
ngIf=
"titleText"
6 <ng-container class=
"modal-content">
7 <form [formGroup]=
"formGroup"
10 <div class=
"modal-body">
11 <p *
ngIf=
"message">{{ message }}
</p>
12 <ng-container *
ngFor=
"let field of fields">
13 <div class=
"form-group row cd-{{field.name}}-form-group">
14 <label *
ngIf=
"field.label"
15 class=
"cd-col-form-label"
16 [ngClass]=
"{'required': field?.required === true}"
20 <div [ngClass]=
"{'cd-col-form-input': field.label, 'col-sm-12': !field.label}">
21 <input *
ngIf=
"['text', 'number'].includes(field.type)"
26 [formControlName]=
"field.name">
27 <input *
ngIf=
"field.type === 'binary'"
32 [formControlName]=
"field.name"
34 <select *
ngIf=
"field.type === 'select'"
37 [formControlName]=
"field.name">
38 <option *
ngIf=
"field?.typeConfig?.placeholder"
40 {{ field?.typeConfig?.placeholder }}
42 <option *
ngFor=
"let option of field?.typeConfig?.options"
43 [value]=
"option.value">
47 <cd-select-badges *
ngIf=
"field.type === 'select-badges'"
50 [customBadges]=
"field?.typeConfig?.customBadges"
51 [options]=
"field?.typeConfig?.options"
52 [messages]=
"field?.typeConfig?.messages">
54 <span *
ngIf=
"formGroup.showError(field.name, formDir)"
55 class=
"invalid-feedback">
62 <div class=
"modal-footer">
63 <cd-form-button-panel (submitActionEvent)=
"onSubmitForm(formGroup.value)"
65 [submitText]=
"submitButtonText"></cd-form-button-panel>