]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/shared/shared-moderation/report-modals/video-report.component.html
Fix report modal error
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / shared-moderation / report-modals / video-report.component.html
CommitLineData
63347a0f
C
1<ng-template #modal>
2 <div class="modal-header">
1ebddadd 3 <h4 i18n class="modal-title">Report video "{{ video.name }}"</h4>
457bb213 4 <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
63347a0f 5 </div>
4f8c0eb0 6
63347a0f 7 <div class="modal-body">
1ebddadd 8 <form novalidate [formGroup]="form" (ngSubmit)="report()">
4f8c0eb0 9
1ebddadd
RK
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">
8ca56654 17
1ebddadd 18 <div class="form-group" *ngFor="let reason of predefinedReasons">
8ca56654 19 <my-peertube-checkbox [inputName]="reason.id" [formControlName]="reason.id" [labelText]="reason.label">
1ebddadd
RK
20 <ng-template *ngIf="reason.help" ptTemplate="help">
21 <div [innerHTML]="reason.help"></div>
22 </ng-template>
8ca56654 23
1ebddadd
RK
24 <ng-container *ngIf="reason.description" ngProjectAs="description">
25 <div [innerHTML]="reason.description"></div>
26 </ng-container>
27 </my-peertube-checkbox>
28 </div>
8ca56654 29
1ebddadd
RK
30 </ng-container>
31 </div>
a1b2f876 32
63347a0f 33 </div>
5f0805d3 34
1ebddadd
RK
35 <div class="col-7">
36 <div class="row justify-content-center">
37 <div class="col-12 col-lg-9 mb-2">
33f6dce1 38 <my-embed [video]="video"></my-embed>
1ebddadd
RK
39 </div>
40 </div>
41
42 <div class="mb-1 start-at" formGroupName="timestamp">
43 <my-peertube-checkbox
44 formControlName="hasStart"
45 i18n-labelText labelText="Start at"
46 ></my-peertube-checkbox>
47
48 <my-timestamp-input
49 [timestamp]="timestamp.startAt"
50 [maxTimestamp]="video.duration"
51 formControlName="startAt"
52 inputName="startAt"
53 >
54 </my-timestamp-input>
55 </div>
56
57 <div class="mb-3 stop-at" formGroupName="timestamp" *ngIf="timestamp.hasStart">
58 <my-peertube-checkbox
59 formControlName="hasEnd"
60 i18n-labelText labelText="Stop at"
61 ></my-peertube-checkbox>
4f8c0eb0 62
1ebddadd
RK
63 <my-timestamp-input
64 [timestamp]="timestamp.endAt"
65 [maxTimestamp]="video.duration"
66 formControlName="endAt"
67 inputName="endAt"
68 >
69 </my-timestamp-input>
70 </div>
71
72 <div i18n class="information">
cfde28ba 73 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>.
1ebddadd
RK
74 </div>
75
76 <div class="form-group">
8ca56654 77 <textarea
1ebddadd
RK
78 i18n-placeholder placeholder="Please describe the issue..." formControlName="reason" ngbAutofocus
79 [ngClass]="{ 'input-error': formErrors['reason'] }" class="form-control"
80 ></textarea>
81 <div *ngIf="formErrors.reason" class="form-error">
82 {{ formErrors.reason }}
83 </div>
84 </div>
4f8c0eb0 85 </div>
1ebddadd 86 </div>
63347a0f 87
1ebddadd
RK
88 <div class="form-group inputs">
89 <input
266947e5 90 type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
1ebddadd
RK
91 (click)="hide()" (key.enter)="hide()"
92 >
266947e5
C
93
94 <input type="submit" i18n-value value="Submit" class="peertube-button orange-button" [disabled]="!form.valid">
1ebddadd
RK
95 </div>
96
97 </form>
4f8c0eb0 98 </div>
63347a0f 99</ng-template>