]>
Commit | Line | Data |
---|---|---|
1 | <ng-template #modal> | |
2 | <div class="modal-header"> | |
3 | <h4 i18n class="modal-title">Report video "{{ video.name }}"</h4> | |
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-12 col-md-5"> | |
12 | <label i18n for="reportPredefinedReasons">What is the issue?</label> | |
13 | ||
14 | <div class="ms-2 mt-2 d-flex flex-column"> | |
15 | <ng-container formGroupName="predefinedReasons"> | |
16 | ||
17 | <div class="form-group" *ngFor="let reason of predefinedReasons"> | |
18 | <my-peertube-checkbox [inputName]="reason.id" [formControlName]="reason.id" [labelText]="reason.label"> | |
19 | <ng-template *ngIf="reason.help" ptTemplate="help"> | |
20 | <div [innerHTML]="reason.help"></div> | |
21 | </ng-template> | |
22 | ||
23 | <ng-container *ngIf="reason.description" ngProjectAs="description"> | |
24 | <div [innerHTML]="reason.description"></div> | |
25 | </ng-container> | |
26 | </my-peertube-checkbox> | |
27 | </div> | |
28 | ||
29 | </ng-container> | |
30 | </div> | |
31 | </div> | |
32 | ||
33 | <div class="col-12 col-md-7"> | |
34 | <my-embed [video]="video"></my-embed> | |
35 | ||
36 | <div class="mb-1 mt-3 start-at" formGroupName="timestamp"> | |
37 | <my-peertube-checkbox | |
38 | formControlName="hasStart" | |
39 | i18n-labelText labelText="Start at" | |
40 | ></my-peertube-checkbox> | |
41 | ||
42 | <my-timestamp-input | |
43 | [timestamp]="timestamp.startAt" | |
44 | [maxTimestamp]="video.duration" | |
45 | formControlName="startAt" | |
46 | inputName="startAt" | |
47 | > | |
48 | </my-timestamp-input> | |
49 | </div> | |
50 | ||
51 | <div class="mb-3 stop-at" formGroupName="timestamp" *ngIf="timestamp.hasStart"> | |
52 | <my-peertube-checkbox | |
53 | formControlName="hasEnd" | |
54 | i18n-labelText labelText="Stop at" | |
55 | ></my-peertube-checkbox> | |
56 | ||
57 | <my-timestamp-input | |
58 | [timestamp]="timestamp.endAt" | |
59 | [maxTimestamp]="video.duration" | |
60 | formControlName="endAt" | |
61 | inputName="endAt" | |
62 | > | |
63 | </my-timestamp-input> | |
64 | </div> | |
65 | ||
66 | <div i18n class="information"> | |
67 | Your report will be sent to moderators of {{ currentHost }}<ng-container *ngIf="isRemote()"> and will be forwarded to the video origin ({{ originHost }}) too</ng-container>. | |
68 | </div> | |
69 | ||
70 | <div class="form-group"> | |
71 | <textarea | |
72 | i18n-placeholder placeholder="Please describe the issue..." formControlName="reason" ngbAutofocus | |
73 | [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control" | |
74 | ></textarea> | |
75 | <div *ngIf="formErrors.reason" class="form-error"> | |
76 | {{ formErrors.reason }} | |
77 | </div> | |
78 | </div> | |
79 | </div> | |
80 | </div> | |
81 | ||
82 | <div class="form-group inputs"> | |
83 | <input | |
84 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" | |
85 | (click)="hide()" (key.enter)="hide()" | |
86 | > | |
87 | ||
88 | <input type="submit" i18n-value value="Submit" class="peertube-button orange-button" [disabled]="!form.valid"> | |
89 | </div> | |
90 | ||
91 | </form> | |
92 | </div> | |
93 | </ng-template> |