]>
Commit | Line | Data |
---|---|---|
1 | <ng-template #modal> | |
2 | <ng-container [formGroup]="form"> | |
3 | ||
4 | <div class="modal-header"> | |
5 | <h4 i18n class="modal-title">Add caption</h4> | |
6 | <span class="close" aria-label="Close" role="button" (click)="hide()"></span> | |
7 | </div> | |
8 | ||
9 | <div class="modal-body"> | |
10 | <label i18n for="language">Language</label> | |
11 | <div class="peertube-select-container"> | |
12 | <select id="language" formControlName="language"> | |
13 | <option></option> | |
14 | <option *ngFor="let language of videoCaptionLanguages" [value]="language.id">{{ language.label }}</option> | |
15 | </select> | |
16 | </div> | |
17 | ||
18 | <div *ngIf="formErrors.language" class="form-error"> | |
19 | {{ formErrors.language }} | |
20 | </div> | |
21 | ||
22 | <div class="caption-file"> | |
23 | <my-reactive-file | |
24 | formControlName="captionfile" inputName="captionfile" i18n-inputLabel inputLabel="Select the caption file" | |
25 | [extensions]="videoCaptionExtensions" [maxFileSize]="videoCaptionMaxSize" [displayFilename]="true" | |
26 | ></my-reactive-file> | |
27 | </div> | |
28 | ||
29 | <div *ngIf="isReplacingExistingCaption()" class="warning-replace-caption" i18n> | |
30 | This will replace an existing caption! | |
31 | </div> | |
32 | </div> | |
33 | ||
34 | <div class="modal-footer inputs"> | |
35 | <span i18n class="action-button action-button-cancel" (click)="hide()"> | |
36 | Cancel | |
37 | </span> | |
38 | ||
39 | <input | |
40 | type="submit" i18n-value value="Add this caption" class="action-button-submit" | |
41 | [disabled]="!form.valid" (click)="addCaption()" | |
42 | > | |
43 | </div> | |
44 | </ng-container> | |
45 | </ng-template> |