Skip to content

Commit b293c25

Browse files
Dominik Frantisek BucikHejdaJakub
authored andcommitted
fix: 🐛 Fix loading of add/edit notification dialog
Previous refactor caused variable to be left out unitialized, which prevented the internals of dialogue window to be loaded when it has been opened for group notifications (cherry picked from commit 3060ffa)
1 parent a6c6cef commit b293c25

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

apps/admin-gui/src/app/shared/components/dialogs/add-edit-notification-dialog/add-edit-notification-dialog.component.ts

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -71,32 +71,32 @@ export class AddEditNotificationDialogComponent implements OnInit {
7171
'vo-addMail_ApplicationForm_ApplicationMail_policy',
7272
[vo]
7373
);
74+
}
7475

75-
const formGroupFields: { [key: string]: FormControl } = {};
76-
for (const lang of this.languages) {
77-
// Plain
78-
formGroupFields[`${lang}-plain-subject`] = new FormControl(
79-
this.applicationMail.message[lang].subject,
80-
[]
81-
);
82-
formGroupFields[`${lang}-plain-text`] = new FormControl(
83-
this.applicationMail.message[lang].text,
84-
[]
85-
);
86-
// Html
87-
formGroupFields[`${lang}-html-subject`] = new FormControl(
88-
this.applicationMail.htmlMessage[lang].subject,
89-
[this.inputEscape.htmlContentValidator()]
90-
);
91-
formGroupFields[`${lang}-html-text`] = new FormControl(
92-
this.applicationMail.htmlMessage[lang].text,
93-
[this.inputEscape.htmlContentValidator()]
94-
);
95-
formGroupFields[`${lang}-html-subject`].markAsTouched();
96-
formGroupFields[`${lang}-html-text`].markAsTouched();
97-
}
98-
this.inputFormGroup = new FormGroup(formGroupFields);
76+
const formGroupFields: { [key: string]: FormControl } = {};
77+
for (const lang of this.languages) {
78+
// Plain
79+
formGroupFields[`${lang}-plain-subject`] = new FormControl(
80+
this.applicationMail.message[lang].subject,
81+
[]
82+
);
83+
formGroupFields[`${lang}-plain-text`] = new FormControl(
84+
this.applicationMail.message[lang].text,
85+
[]
86+
);
87+
// Html
88+
formGroupFields[`${lang}-html-subject`] = new FormControl(
89+
this.applicationMail.htmlMessage[lang].subject,
90+
[this.inputEscape.htmlContentValidator()]
91+
);
92+
formGroupFields[`${lang}-html-text`] = new FormControl(
93+
this.applicationMail.htmlMessage[lang].text,
94+
[this.inputEscape.htmlContentValidator()]
95+
);
96+
formGroupFields[`${lang}-html-subject`].markAsTouched();
97+
formGroupFields[`${lang}-html-text`].markAsTouched();
9998
}
99+
this.inputFormGroup = new FormGroup(formGroupFields);
100100
}
101101

102102
cancel(): void {

0 commit comments

Comments
 (0)