]>
Commit | Line | Data |
---|---|---|
1 | <nav aria-label="breadcrumb"> | |
2 | <ol class="breadcrumb"> | |
3 | <li class="breadcrumb-item"> | |
4 | <a routerLink="/my-library/video-playlists" i18n>My Playlists</a> | |
5 | </li> | |
6 | ||
7 | <ng-container *ngIf="isCreation()"> | |
8 | <li class="breadcrumb-item active" i18n>Create</li> | |
9 | </ng-container> | |
10 | <ng-container *ngIf="!isCreation()"> | |
11 | <li class="breadcrumb-item active" i18n>Edit</li> | |
12 | <li class="breadcrumb-item active" aria-current="page"> | |
13 | <a *ngIf="videoPlaylistToUpdate" [routerLink]="[ '/my-library/video-playlists/update', videoPlaylistToUpdate?.uuid ]">{{ videoPlaylistToUpdate?.displayName }}</a> | |
14 | </li> | |
15 | </ng-container> | |
16 | </ol> | |
17 | </nav> | |
18 | ||
19 | <div *ngIf="error" class="alert alert-danger">{{ error }}</div> | |
20 | ||
21 | <form role="form" (ngSubmit)="formValidated()" [formGroup]="form"> | |
22 | ||
23 | <div class="form-row"> <!-- playlist grid --> | |
24 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
25 | <div *ngIf="isCreation()" class="video-playlist-title" i18n>NEW PLAYLIST</div> | |
26 | <div *ngIf="!isCreation() && videoPlaylistToUpdate" class="video-playlist-title" i18n>PLAYLIST</div> | |
27 | </div> | |
28 | ||
29 | <div class="form-group col-12 col-lg-8 col-xl-9"> | |
30 | ||
31 | <div class="col-md-12 col-xl-6"> | |
32 | <div class="form-group"> | |
33 | <label i18n for="displayName">Display name</label> | |
34 | <input | |
35 | type="text" id="displayName" class="form-control" | |
36 | formControlName="displayName" [ngClass]="{ 'input-error': formErrors['displayName'] }" | |
37 | > | |
38 | <div *ngIf="formErrors['displayName']" class="form-error"> | |
39 | {{ formErrors['displayName'] }} | |
40 | </div> | |
41 | </div> | |
42 | ||
43 | <div class="form-group"> | |
44 | <label i18n for="description">Description</label><my-help helpType="markdownText"></my-help> | |
45 | <my-markdown-textarea | |
46 | id="description" formControlName="description" | |
47 | [ngClass]="{ 'input-error': formErrors['description'] }" | |
48 | ></my-markdown-textarea> | |
49 | <div *ngIf="formErrors.description" class="form-error"> | |
50 | {{ formErrors.description }} | |
51 | </div> | |
52 | </div> | |
53 | </div> | |
54 | ||
55 | <div class="col-md-12 col-xl-6"> | |
56 | <div class="form-group"> | |
57 | <label i18n for="privacy">Privacy</label> | |
58 | <div class="peertube-select-container"> | |
59 | <select id="privacy" formControlName="privacy" class="form-control"> | |
60 | <option *ngFor="let privacy of videoPlaylistPrivacies" [value]="privacy.id">{{ privacy.label }}</option> | |
61 | </select> | |
62 | </div> | |
63 | ||
64 | <div *ngIf="formErrors.privacy" class="form-error"> | |
65 | {{ formErrors.privacy }} | |
66 | </div> | |
67 | </div> | |
68 | ||
69 | <div class="form-group"> | |
70 | <label i18n>Channel</label> | |
71 | ||
72 | <my-select-channel | |
73 | labelForId="videoChannelIdl" [items]="userVideoChannels" formControlName="videoChannelId" | |
74 | ></my-select-channel> | |
75 | ||
76 | <div *ngIf="formErrors['videoChannelId']" class="form-error"> | |
77 | {{ formErrors['videoChannelId'] }} | |
78 | </div> | |
79 | </div> | |
80 | ||
81 | <div class="form-group"> | |
82 | <label i18n>Playlist thumbnail</label> | |
83 | ||
84 | <my-preview-upload | |
85 | i18n-inputLabel inputLabel="Edit" inputName="thumbnailfile" formControlName="thumbnailfile" | |
86 | previewWidth="223px" previewHeight="122px" | |
87 | ></my-preview-upload> | |
88 | </div> | |
89 | </div> | |
90 | ||
91 | <div class="form-row"> <!-- submit placement block --> | |
92 | <div class="col-md-7 col-xl-5"></div> | |
93 | <div class="col-md-5 col-xl-5 d-inline-flex"> | |
94 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> | |
95 | </div> | |
96 | </div> | |
97 | </div> | |
98 | </div> | |
99 | ||
100 | </form> |