]>
Commit | Line | Data |
---|---|---|
8ca56654 C |
1 | <ng-template #modal> |
2 | <div class="modal-header"> | |
cfde28ba | 3 | <h4 class="modal-title">{{ modalTitle }}</h4> |
8ca56654 C |
4 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> |
5 | </div> | |
6 | ||
7 | <div class="modal-body"> | |
8 | <form novalidate [formGroup]="form" (ngSubmit)="report()"> | |
9 | ||
10 | <div class="row"> | |
11 | <div class="col-5 form-group"> | |
12 | ||
13 | <label i18n for="reportPredefinedReasons">What is the issue?</label> | |
14 | ||
15 | <div class="ml-2 mt-2 d-flex flex-column"> | |
16 | <ng-container formGroupName="predefinedReasons"> | |
17 | ||
18 | <div class="form-group" *ngFor="let reason of predefinedReasons"> | |
19 | <my-peertube-checkbox [inputName]="reason.id" [formControlName]="reason.id" [labelText]="reason.label"> | |
20 | <ng-template *ngIf="reason.help" ptTemplate="help"> | |
21 | <div [innerHTML]="reason.help"></div> | |
22 | </ng-template> | |
23 | ||
24 | <ng-container *ngIf="reason.description" ngProjectAs="description"> | |
25 | <div [innerHTML]="reason.description"></div> | |
26 | </ng-container> | |
27 | </my-peertube-checkbox> | |
28 | </div> | |
29 | ||
30 | </ng-container> | |
31 | </div> | |
32 | ||
33 | </div> | |
34 | ||
35 | <div class="col-7"> | |
36 | <div i18n class="information"> | |
cfde28ba | 37 | Your report will be sent to moderators of {{ currentHost }}<ng-container *ngIf="isRemote()"> and will be forwarded to the comment origin ({{ originHost }}) too</ng-container>. |
8ca56654 C |
38 | </div> |
39 | ||
40 | <div class="form-group"> | |
41 | <textarea | |
42 | i18n-placeholder placeholder="Please describe the issue..." formControlName="reason" ngbAutofocus | |
43 | [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control" | |
44 | ></textarea> | |
45 | <div *ngIf="formErrors.reason" class="form-error"> | |
46 | {{ formErrors.reason }} | |
47 | </div> | |
48 | </div> | |
49 | </div> | |
50 | </div> | |
51 | ||
52 | <div class="form-group inputs"> | |
53 | <input | |
266947e5 | 54 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
8ca56654 C |
55 | (click)="hide()" (key.enter)="hide()" |
56 | > | |
266947e5 C |
57 | |
58 | <input type="submit" i18n-value value="Submit" class="peertube-button orange-button" [disabled]="!form.valid"> | |
8ca56654 C |
59 | </div> |
60 | ||
61 | </form> | |
62 | </div> | |
63 | </ng-template> |