]>
Commit | Line | Data |
---|---|---|
63347a0f C |
1 | <ng-template #modal> |
2 | <ng-container [formGroup]="form"> | |
40e87e9e | 3 | |
63347a0f C |
4 | <div class="modal-header"> |
5 | <h4 i18n class="modal-title">Add caption</h4> | |
457bb213 | 6 | <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon> |
63347a0f | 7 | </div> |
40e87e9e | 8 | |
63347a0f C |
9 | <div class="modal-body"> |
10 | <label i18n for="language">Language</label> | |
02c01341 RK |
11 | <div class="peertube-ng-select-container"> |
12 | <ng-select | |
13 | labelForId="language" [items]="videoCaptionLanguages" formControlName="language" | |
14 | bindLabel="label" bindValue="id" | |
15 | ></ng-select> | |
63347a0f | 16 | </div> |
40e87e9e | 17 | |
63347a0f C |
18 | <div *ngIf="formErrors.language" class="form-error"> |
19 | {{ formErrors.language }} | |
20 | </div> | |
40e87e9e | 21 | |
63347a0f C |
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" | |
a2c5cd4a | 26 | [buttonTooltip]="getReactiveFileButtonTooltip()" |
63347a0f C |
27 | ></my-reactive-file> |
28 | </div> | |
40e87e9e | 29 | |
63347a0f C |
30 | <div *ngIf="isReplacingExistingCaption()" class="warning-replace-caption" i18n> |
31 | This will replace an existing caption! | |
32 | </div> | |
33 | </div> | |
40e87e9e | 34 | |
63347a0f | 35 | <div class="modal-footer inputs"> |
a6d5ff76 | 36 | <input |
266947e5 | 37 | type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button" |
a6d5ff76 RK |
38 | (click)="hide()" (key.enter)="hide()" |
39 | > | |
40e87e9e | 40 | |
63347a0f | 41 | <input |
266947e5 | 42 | type="submit" i18n-value value="Add this caption" class="peertube-button orange-button" |
63347a0f C |
43 | [disabled]="!form.valid" (click)="addCaption()" |
44 | > | |
40e87e9e | 45 | </div> |
63347a0f C |
46 | </ng-container> |
47 | </ng-template> |