1- < h1 mat-dialog-title class ="dialog-title "> {{ 'SHARED.REPORT_DIALOG.TITLE' | translate }}</ h1 >
2- < div mat-dialog-content >
3- < ng-container *ngIf ="isAssetReportAvailable; else emailInfo ">
4- < p class ="dialog-intro "> {{ 'SHARED.REPORT_DIALOG.INTRO' | translate }}</ p >
5- < form [formGroup] ="reportForm " (ngSubmit) ="submitReport() ">
6- < mat-form-field appearance ="outline " class ="full-width name-field ">
7- < mat-label > {{ 'SHARED.REPORT_DIALOG.NAME' | translate }}</ mat-label >
8- < input matInput formControlName ="name " required >
9- < mat-error *ngIf ="reportForm.get('name')?.hasError('required') ">
10- {{ 'SHARED.REPORT_DIALOG.NAME_REQUIRED' | translate }}
11- </ mat-error >
12- </ mat-form-field >
1+ < div class ="modal-overlay " (click) ="closeDialog() ">
2+ < div class ="modal-wrapper " (click) ="$event.stopPropagation() ">
3+ < div class ="dialog-container ">
4+ < h1 class ="dialog-title "> {{ 'SHARED.REPORT_DIALOG.TITLE' | translate }}</ h1 >
5+ < div class ="dialog-content ">
6+ < ng-container *ngIf ="isAssetReportAvailable; else emailInfo ">
7+ < p class ="dialog-intro "> {{ 'SHARED.REPORT_DIALOG.INTRO' | translate }}</ p >
8+ < form [formGroup] ="reportForm " (ngSubmit) ="submitReport() ">
9+ < div class ="form-field full-width name-field ">
10+ < label class ="form-label "> {{ 'SHARED.REPORT_DIALOG.NAME' | translate }}</ label >
11+ < input type ="text " class ="form-input " formControlName ="name " required >
12+ < div class ="form-error " *ngIf ="reportForm.get('name')?.hasError('required') && reportForm.get('name')?.touched ">
13+ {{ 'SHARED.REPORT_DIALOG.NAME_REQUIRED' | translate }}
14+ </ div >
15+ </ div >
1316
14- < mat-form-field appearance =" outline " class ="full-width ">
15- < mat -label> {{ 'SHARED.REPORT_DIALOG.EMAIL' | translate }}</ mat- label>
16- < input matInput formControlName ="email " type ="email ">
17- < mat -error *ngIf ="reportForm.get('email')?.hasError('email') ">
18- {{ 'SHARED.REPORT_DIALOG.EMAIL_INVALID' | translate }}
19- </ mat-error >
20- </ mat-form-field >
17+ < div class ="form-field full-width ">
18+ < label class =" form -label" > {{ 'SHARED.REPORT_DIALOG.EMAIL' | translate }}</ label >
19+ < input type ="email " class =" form-input " formControlName ="email ">
20+ < div class =" form -error" *ngIf ="reportForm.get('email')?.hasError('email') && reportForm.get('email')?.touched ">
21+ {{ 'SHARED.REPORT_DIALOG.EMAIL_INVALID' | translate }}
22+ </ div >
23+ </ div >
2124
22- < mat-form-field appearance =" outline " class ="full-width ">
23- < mat -label> {{ 'SHARED.REPORT_DIALOG.SUBJECT' | translate }}</ mat- label>
24- < input matInput formControlName ="subject " required >
25- < mat -error *ngIf ="reportForm.get('subject')?.hasError('required') ">
26- {{ 'SHARED.REPORT_DIALOG.SUBJECT_REQUIRED' | translate }}
27- </ mat-error >
28- </ mat-form-field >
25+ < div class ="form-field full-width ">
26+ < label class =" form -label" > {{ 'SHARED.REPORT_DIALOG.SUBJECT' | translate }}</ label >
27+ < input type =" text " class =" form-input " formControlName ="subject " required >
28+ < div class =" form -error" *ngIf ="reportForm.get('subject')?.hasError('required') && reportForm.get('subject')?.touched ">
29+ {{ 'SHARED.REPORT_DIALOG.SUBJECT_REQUIRED' | translate }}
30+ </ div >
31+ </ div >
2932
30- < mat-form-field appearance ="outline " class ="full-width ">
31- < mat-label > {{ 'SHARED.REPORT_DIALOG.REPORT' | translate }}</ mat-label >
32- < textarea matInput formControlName ="report " rows ="4 " required placeholder ="{{ 'SHARED.REPORT_DIALOG.PLACEHOLDER' | translate }} "> </ textarea >
33- < mat-error *ngIf ="reportForm.get('report')?.hasError('required') ">
34- {{ 'SHARED.REPORT_DIALOG.REPORT_REQUIRED' | translate }}
35- </ mat-error >
36- </ mat-form-field >
37- < div class ="privacy-acceptance " style ="margin-top:8px; ">
38- < mat-checkbox formControlName ="privacyAccepted " aria-label ="Accept privacy policy ">
39- {{ 'SHARED.REPORT_DIALOG.READ_ACCEPT' | translate }}
40- < a [href] ="EXTERNAL_LINKS.PRIVACY_POLICY " target ="_blank " rel ="noopener " style ="color:#1976d2; ">
41- {{ 'SHARED.REPORT_DIALOG.PRIVACY_POLICY' | translate }}
42- </ a > .
43- </ mat-checkbox >
44- < mat-error *ngIf ="reportForm.get('privacyAccepted')?.hasError('required') && (reportForm.get('privacyAccepted')?.touched || reportForm.touched) ">
45- {{ 'SHARED.REPORT_DIALOG.PRIVACY_ACCEPTANCE_REQUIRED' | translate }}
46- </ mat-error >
47- </ div >
48- </ form >
49- </ ng-container >
33+ < div class ="form-field full-width ">
34+ < label class ="form-label "> {{ 'SHARED.REPORT_DIALOG.REPORT' | translate }}</ label >
35+ < textarea class ="form-textarea " formControlName ="report " rows ="4 " required placeholder ="{{ 'SHARED.REPORT_DIALOG.PLACEHOLDER' | translate }} "> </ textarea >
36+ < div class ="form-error " *ngIf ="reportForm.get('report')?.hasError('required') && reportForm.get('report')?.touched ">
37+ {{ 'SHARED.REPORT_DIALOG.REPORT_REQUIRED' | translate }}
38+ </ div >
39+ </ div >
40+
41+ < div class ="privacy-acceptance ">
42+ < label class ="checkbox-container ">
43+ < input type ="checkbox " formControlName ="privacyAccepted " aria-label ="Accept privacy policy ">
44+ < span class ="checkbox-label ">
45+ {{ 'SHARED.REPORT_DIALOG.READ_ACCEPT' | translate }}
46+ < a [href] ="EXTERNAL_LINKS.PRIVACY_POLICY " target ="_blank " rel ="noopener " class ="privacy-link ">
47+ {{ 'SHARED.REPORT_DIALOG.PRIVACY_POLICY' | translate }}
48+ </ a > .
49+ </ span >
50+ </ label >
51+ < div class ="form-error " *ngIf ="reportForm.get('privacyAccepted')?.hasError('required') && (reportForm.get('privacyAccepted')?.touched || reportForm.touched) ">
52+ {{ 'SHARED.REPORT_DIALOG.PRIVACY_ACCEPTANCE_REQUIRED' | translate }}
53+ </ div >
54+ </ div >
55+ </ form >
56+ </ ng-container >
5057
51- < ng-template #emailInfo >
52- < p [innerHTML] ="'SHARED.REPORT_DIALOG.EMAIL_INSTRUCTIONS' | translate:{ assetName: this.data.assetName, assetId: this.data.assetId } "> </ p >
53- </ ng-template >
54- </ div >
55- < div mat-dialog-actions align ="end ">
56- < button mat-button (click) ="closeDialog() ">
57- {{ 'SHARED.REPORT_DIALOG.CANCEL' | translate }}
58- </ button >
59- < button *ngIf ="isAssetReportAvailable " mat-raised-button color ="warn " (click) ="submitReport() " [disabled] ="!reportForm.valid ">
60- {{ 'SHARED.REPORT_DIALOG.SUBMIT_REPORT' | translate }}
61- </ button >
58+ < ng-template #emailInfo >
59+ < p [innerHTML] ="'SHARED.REPORT_DIALOG.EMAIL_INSTRUCTIONS' | translate:{ assetName: this.data.assetName, assetId: this.data.assetId } "> </ p >
60+ </ ng-template >
61+ </ div >
62+ < div class ="dialog-actions ">
63+ < button class ="btn btn-secondary " (click) ="closeDialog() ">
64+ {{ 'SHARED.REPORT_DIALOG.CANCEL' | translate }}
65+ </ button >
66+ < button *ngIf ="isAssetReportAvailable " class ="btn btn-primary " (click) ="submitReport() " [disabled] ="!reportForm.valid ">
67+ {{ 'SHARED.REPORT_DIALOG.SUBMIT_REPORT' | translate }}
68+ </ button >
69+ </ div >
70+ </ div >
71+ </ div >
6272</ div >
0 commit comments