]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/video-edit/video-add.component.html
Client: use ng2-tag-input for forms with video tags
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-edit / video-add.component.html
CommitLineData
dc8bc31b
C
1<h3>Upload a video</h3>
2
1cdb5c0f
C
3<div *ngIf="error" class="alert alert-danger">{{ error }}</div>
4
46485303 5<form novalidate [formGroup]="form">
dc8bc31b 6 <div class="form-group">
e822fdae 7 <label for="name">Name</label>
dc8bc31b 8 <input
4b2f33f3
C
9 type="text" class="form-control" id="name"
10 formControlName="name"
dc8bc31b 11 >
4b2f33f3
C
12 <div *ngIf="formErrors.name" class="alert alert-danger">
13 {{ formErrors.name }}
dc8bc31b
C
14 </div>
15 </div>
16
92fb909c
C
17 <div class="form-group">
18 <label for="nsfw">NSFW</label>
19 <input
20 type="checkbox" id="nsfw"
21 formControlName="nsfw"
22 >
23 </div>
24
6e07c3de
C
25 <div class="form-group">
26 <label for="category">Category</label>
27 <select class="form-control" id="category" formControlName="category">
28 <option></option>
29 <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option>
30 </select>
31
32 <div *ngIf="formErrors.category" class="alert alert-danger">
33 {{ formErrors.category }}
34 </div>
35 </div>
36
d07137b9
C
37 <div class="form-group">
38 <label for="licence">Licence</label>
39 <select class="form-control" id="licence" formControlName="licence">
40 <option></option>
41 <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option>
42 </select>
43
44 <div *ngIf="formErrors.licence" class="alert alert-danger">
45 {{ formErrors.licence }}
46 </div>
47 </div>
48
db216afd
C
49 <div class="form-group">
50 <label for="language">Language</label>
51 <select class="form-control" id="language" formControlName="language">
52 <option></option>
53 <option *ngFor="let language of videoLanguages" [value]="language.id">{{ language.label }}</option>
54 </select>
55
56 <div *ngIf="formErrors.language" class="alert alert-danger">
57 {{ formErrors.language }}
58 </div>
59 </div>
60
763bed9b 61 <div class="form-group">
3758da94
C
62 <label for="tags" class="label-tags">Tags</label> <span class="little-information">(press enter to add the tag)</span>
63 <tag-input
64 [ngModel]="tags" [validators]="tagValidators" [errorMessages]="tagValidatorsMessages"
65 formControlName="tags" maxItems="3" modelAsStrings="true"
66 ></tag-input>
bf57d5ee
C
67 </div>
68
e822fdae
C
69 <div class="form-group">
70 <label for="videofile">File</label>
71 <div class="btn btn-default btn-file" [ngClass]="{ 'disabled': filename !== null }" >
763bed9b 72 <span>Select the video...</span>
e822fdae
C
73 <input
74 type="file" name="videofile" id="videofile"
75 ng2FileSelect [uploader]="uploader" [disabled]="filename !== null"
bf57d5ee 76 (change)="fileChanged()"
e822fdae 77 >
763bed9b 78 </div>
e822fdae 79 </div>
dc8bc31b 80
e822fdae
C
81 <div class="file-to-upload">
82 <div class="file" *ngIf="uploader.queue.length > 0">
83 <span class="filename">{{ filename }}</span>
84 <span class="glyphicon glyphicon-remove" (click)="removeFile()"></span>
85 </div>
763bed9b 86 </div>
dc8bc31b 87
bf57d5ee
C
88 <div *ngIf="fileError" class="alert alert-danger">
89 {{ fileError }}
90 </div>
91
dc8bc31b
C
92 <div class="form-group">
93 <label for="description">Description</label>
94 <textarea
4b2f33f3
C
95 id="description" class="form-control" placeholder="Description..."
96 formControlName="description"
dc8bc31b
C
97 >
98 </textarea>
4b2f33f3
C
99 <div *ngIf="formErrors.description" class="alert alert-danger">
100 {{ formErrors.description }}
dc8bc31b
C
101 </div>
102 </div>
103
e822fdae
C
104 <div class="progress">
105 <progressbar [value]="uploader.progress" max="100"></progressbar>
dc8bc31b
C
106 </div>
107
e822fdae
C
108 <div class="form-group">
109 <input
46485303 110 type="button" value="Upload" class="btn btn-default form-control"
46485303 111 (click)="upload()"
e822fdae
C
112 >
113 </div>
dc8bc31b 114</form>