]>
Commit | Line | Data |
---|---|---|
1 | <nav aria-label="breadcrumb"> | |
2 | <ol class="breadcrumb"> | |
3 | <li class="breadcrumb-item"> | |
4 | <a routerLink="/my-library/video-channels" i18n>My Channels</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="videoChannelToUpdate" [routerLink]="[ '/my-library/video-channels/update', videoChannelToUpdate?.nameWithHost ]">{{ videoChannelToUpdate?.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"> <!-- channel grid --> | |
24 | <div class="form-group col-12 col-lg-4 col-xl-3"> | |
25 | <div *ngIf="isCreation()" class="video-channel-title" i18n>NEW CHANNEL</div> | |
26 | <div *ngIf="!isCreation() && videoChannelToUpdate" class="video-channel-title" i18n>CHANNEL</div> | |
27 | </div> | |
28 | ||
29 | <div class="form-group col-12 col-lg-8 col-xl-9"> | |
30 | ||
31 | <div class="form-group" *ngIf="isCreation()"> | |
32 | <label i18n for="name">Name</label> | |
33 | <div class="input-group"> | |
34 | <input | |
35 | type="text" id="name" i18n-placeholder placeholder="Example: my_channel" | |
36 | formControlName="name" [ngClass]="{ 'input-error': formErrors['name'] }" class="form-control" | |
37 | > | |
38 | <div class="input-group-append"> | |
39 | <span class="input-group-text">@{{ instanceHost }}</span> | |
40 | </div> | |
41 | </div> | |
42 | <div *ngIf="formErrors['name']" class="form-error"> | |
43 | {{ formErrors['name'] }} | |
44 | </div> | |
45 | </div> | |
46 | ||
47 | <my-actor-avatar-info | |
48 | *ngIf="!isCreation() && videoChannelToUpdate" | |
49 | [actor]="videoChannelToUpdate" (avatarChange)="onAvatarChange($event)" (avatarDelete)="onAvatarDelete()" | |
50 | ></my-actor-avatar-info> | |
51 | ||
52 | <div class="form-group"> | |
53 | <label i18n for="display-name">Display name</label> | |
54 | <input | |
55 | type="text" id="display-name" class="form-control" | |
56 | formControlName="display-name" [ngClass]="{ 'input-error': formErrors['display-name'] }" | |
57 | > | |
58 | <div *ngIf="formErrors['display-name']" class="form-error"> | |
59 | {{ formErrors['display-name'] }} | |
60 | </div> | |
61 | </div> | |
62 | ||
63 | <div class="form-group"> | |
64 | <label i18n for="description">Description</label> | |
65 | <textarea | |
66 | id="description" formControlName="description" class="form-control" | |
67 | [ngClass]="{ 'input-error': formErrors['description'] }" | |
68 | ></textarea> | |
69 | <div *ngIf="formErrors.description" class="form-error"> | |
70 | {{ formErrors.description }} | |
71 | </div> | |
72 | </div> | |
73 | ||
74 | <div class="form-group"> | |
75 | <label for="support">Support</label> | |
76 | <my-help | |
77 | helpType="markdownEnhanced" i18n-preHtml preHtml="Short text to tell people how they can support your channel (membership platform...).<br /><br /> | |
78 | When you will upload a video in this channel, the video support field will be automatically filled by this text." | |
79 | ></my-help> | |
80 | <my-markdown-textarea | |
81 | id="support" formControlName="support" textareaMaxWidth="500px" markdownType="enhanced" | |
82 | [classes]="{ 'input-error': formErrors['support'] }" | |
83 | ></my-markdown-textarea> | |
84 | <div *ngIf="formErrors.support" class="form-error"> | |
85 | {{ formErrors.support }} | |
86 | </div> | |
87 | </div> | |
88 | ||
89 | <div class="form-group" *ngIf="isBulkUpdateVideosDisplayed()"> | |
90 | <my-peertube-checkbox | |
91 | inputName="bulkVideosSupportUpdate" formControlName="bulkVideosSupportUpdate" | |
92 | i18n-labelText labelText="Overwrite support field of all videos of this channel" | |
93 | ></my-peertube-checkbox> | |
94 | </div> | |
95 | ||
96 | </div> | |
97 | </div> | |
98 | ||
99 | <div class="form-row"> <!-- submit placement block --> | |
100 | <div class="col-md-7 col-xl-5"></div> | |
101 | <div class="col-md-5 col-xl-5 d-inline-flex"> | |
102 | <input type="submit" value="{{ getFormButtonTitle() }}" [disabled]="!form.valid"> | |
103 | </div> | |
104 | </div> | |
105 | </form> |