@@ -12,18 +12,12 @@ <h1>{{ 'info.feedback.head' | translate }}</h1>
1212 </ div >
1313 </ div >
1414
15- @if (feedbackForm.controls.email.invalid && (feedbackForm.controls.email.dirty || feedbackForm.controls.email.touched)) {
16- < div class ="row ">
17- < div class ="col-sm-12 alert ">
18- @if (feedbackForm.controls.email.errors?.required) {
19- < ds-error message ="{{'info.feedback.error.email.required' | translate}} "> </ ds-error >
20- }
21- @if (feedbackForm.controls.email.errors?.pattern) {
22- < ds-error message ="{{'info.feedback.error.email.required' | translate}} "> </ ds-error >
23- }
24- </ div >
15+ < div class ="row " *ngIf ="feedbackForm.controls.email.invalid && (feedbackForm.controls.email.dirty || feedbackForm.controls.email.touched) ">
16+ < div class ="col-sm-12 alert ">
17+ < ds-error *ngIf ="feedbackForm.controls.email.errors?.required " message ="{{'info.feedback.error.email.required' | translate}} "> </ ds-error >
18+ < ds-error *ngIf ="feedbackForm.controls.email.errors?.pattern " message ="{{'info.feedback.error.email.required' | translate}} "> </ ds-error >
2519 </ div >
26- }
20+ </ div >
2721
2822 < div class ="row mt-3 ">
2923 < div class ="control-group col-sm-12 ">
@@ -32,15 +26,11 @@ <h1>{{ 'info.feedback.head' | translate }}</h1>
3226 </ div >
3327 </ div >
3428
35- @if (feedbackForm.controls.message.invalid && (feedbackForm.controls.message.dirty || feedbackForm.controls.message.touched)) {
36- < div class ="row ">
37- < div class ="col-sm-12 alert ">
38- @if (feedbackForm.controls.message.errors?.required) {
39- < ds-error message ="{{'info.feedback.error.message.required' | translate}} "> </ ds-error >
40- }
41- </ div >
29+ < div class ="row " *ngIf ="feedbackForm.controls.message.invalid && (feedbackForm.controls.message.dirty || feedbackForm.controls.message.touched) ">
30+ < div class ="col-sm-12 alert ">
31+ < ds-error *ngIf ="feedbackForm.controls.message.errors?.required " message ="{{'info.feedback.error.message.required' | translate}} "> </ ds-error >
4232 </ div >
43- }
33+ </ div >
4434
4535 < div class ="row mt-3 ">
4636 < div class ="control-group col-sm-12 ">
@@ -50,47 +40,40 @@ <h1>{{ 'info.feedback.head' | translate }}</h1>
5040 </ div >
5141 </ div >
5242
53- @if (!submissionVerification) {
54- < div class ="row py-2 ">
55- < div class ="control-group col-sm-12 text-end ">
56- < button [dsBtnDisabled] ="!feedbackForm.valid " class ="btn btn-primary " name ="submit " (click) ="createFeedback() "> {{ 'info.feedback.send' | translate }}</ button >
57- </ div >
43+ < div class ="row py-2 " *ngIf ="!submissionVerification ">
44+ < div class ="control-group col-sm-12 text-end ">
45+ < button [dsBtnDisabled] ="!feedbackForm.valid " class ="btn btn-primary " name ="submit " (click) ="createFeedback() "> {{ 'info.feedback.send' | translate }}</ button >
5846 </ div >
59- }
47+ </ div >
6048 </ fieldset >
6149
62- @let captchaCookieAccepted = isRecaptchaCookieAccepted();
63- @if (submissionVerification && !captchaCookieAccepted) {
64- < ds-alert [type] ="AlertTypeEnum.Warning ">
65- < p class ="m-0 " [innerHTML] ="MESSAGE_PREFIX + '.google-recaptcha.must-accept-cookies' | translate "> </ p >
66- < p class ="m-0 "> < a href ="javascript:void(0); " (click) ="openCookieSettings() "> {{ MESSAGE_PREFIX + '.google-recaptcha.open-cookie-settings' | translate }}</ a > </ p >
67- </ ds-alert >
68- }
69- @if (captchaCookieAccepted && (googleRecaptchaService.captchaVersion() | async) === 'v2') {
70- < div class ="my-3 ">
71- < ds-google-recaptcha [captchaMode] ="(captchaMode() | async) "
72- (executeRecaptcha) ="submitFeedback($event) " (checkboxChecked) ="onCheckboxChecked($event) "
73- (showNotification) ="showNotification($event) "> </ ds-google-recaptcha >
74- </ div >
75- }
50+ < ds-alert *ngIf ="submissionVerification && !isRecaptchaCookieAccepted() " [type] ="AlertTypeEnum.Warning ">
51+ < p class ="m-0 " [innerHTML] ="MESSAGE_PREFIX + '.google-recaptcha.must-accept-cookies' | translate "> </ p >
52+ < p class ="m-0 "> < a href ="javascript:void(0); " (click) ="openCookieSettings() "> {{ MESSAGE_PREFIX + '.google-recaptcha.open-cookie-settings' | translate }}</ a > </ p >
53+ </ ds-alert >
7654
77- @if (submissionVerification) {
78- < div class ="row py-2 ">
79- < div class ="control-group col-sm-12 text-end ">
80- @if (!((captchaVersion() | async) === 'v2' && (captchaMode() | async) === 'invisible')) {
81- < button class ="btn btn-primary "
82- [dsBtnDisabled] ="feedbackForm.invalid || submissionVerification && !captchaCookieAccepted || disableUntilChecked "
83- (click) ="submitFeedback() ">
84- {{ 'info.feedback.send' | translate }}
85- </ button >
86- } @else {
87- < button class ="btn btn-primary " [dsBtnDisabled] ="feedbackForm.invalid " (click) ="executeRecaptcha() ">
88- {{ 'info.feedback.send' | translate }}
89- </ button >
90- }
91- </ div >
55+ < div class ="my-3 " *ngIf ="isRecaptchaCookieAccepted() && (googleRecaptchaService.captchaVersion() | async) === 'v2' ">
56+ < ds-google-recaptcha [captchaMode] ="(captchaMode() | async) "
57+ (executeRecaptcha) ="submitFeedback($event) " (checkboxChecked) ="onCheckboxChecked($event) "
58+ (showNotification) ="showNotification($event) "> </ ds-google-recaptcha >
59+ </ div >
60+
61+ < div class ="row py-2 " *ngIf ="submissionVerification ">
62+ < div class ="control-group col-sm-12 text-end ">
63+ < ng-container *ngIf ="!((captchaVersion() | async) === 'v2' && (captchaMode() | async) === 'invisible'); else invisibleBtn ">
64+ < button class ="btn btn-primary "
65+ [dsBtnDisabled] ="feedbackForm.invalid || submissionVerification && !isRecaptchaCookieAccepted() || disableUntilChecked "
66+ (click) ="submitFeedback() ">
67+ {{ 'info.feedback.send' | translate }}
68+ </ button >
69+ </ ng-container >
70+ < ng-template #invisibleBtn >
71+ < button class ="btn btn-primary " [dsBtnDisabled] ="feedbackForm.invalid " (click) ="executeRecaptcha() ">
72+ {{ 'info.feedback.send' | translate }}
73+ </ button >
74+ </ ng-template >
9275 </ div >
93- }
76+ </ div >
9477 </ form >
9578 </ div >
9679</ div >
0 commit comments