]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/videos/video-add/video-add.component.html
Server: Add NSFW in user profile
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-add / 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
6e07c3de
C
17 <div class="form-group">
18 <label for="category">Category</label>
19 <select class="form-control" id="category" formControlName="category">
20 <option></option>
21 <option *ngFor="let category of videoCategories" [value]="category.id">{{ category.label }}</option>
22 </select>
23
24 <div *ngIf="formErrors.category" class="alert alert-danger">
25 {{ formErrors.category }}
26 </div>
27 </div>
28
d07137b9
C
29 <div class="form-group">
30 <label for="licence">Licence</label>
31 <select class="form-control" id="licence" formControlName="licence">
32 <option></option>
33 <option *ngFor="let licence of videoLicences" [value]="licence.id">{{ licence.label }}</option>
34 </select>
35
36 <div *ngIf="formErrors.licence" class="alert alert-danger">
37 {{ formErrors.licence }}
38 </div>
39 </div>
40
763bed9b 41 <div class="form-group">
bf57d5ee 42 <label for="tags">Tags</label> <span class="little-information">(press enter to add the tag)</span>
e822fdae 43 <input
4b2f33f3
C
44 type="text" class="form-control" id="currentTag"
45 formControlName="currentTag" (keyup)="onTagKeyPress($event)"
e822fdae 46 >
4b2f33f3
C
47 <div *ngIf="formErrors.currentTag" class="alert alert-danger">
48 {{ formErrors.currentTag }}
e822fdae
C
49 </div>
50 </div>
51
52 <div class="tags">
4b2f33f3 53 <div class="label label-primary tag" *ngFor="let tag of tags">
e822fdae
C
54 {{ tag }}
55 <span class="remove" (click)="removeTag(tag)">x</span>
56 </div>
57 </div>
58
bf57d5ee
C
59 <div *ngIf="tagsError" class="alert alert-danger">
60 {{ tagsError }}
61 </div>
62
e822fdae
C
63 <div class="form-group">
64 <label for="videofile">File</label>
65 <div class="btn btn-default btn-file" [ngClass]="{ 'disabled': filename !== null }" >
763bed9b 66 <span>Select the video...</span>
e822fdae
C
67 <input
68 type="file" name="videofile" id="videofile"
69 ng2FileSelect [uploader]="uploader" [disabled]="filename !== null"
bf57d5ee 70 (change)="fileChanged()"
e822fdae 71 >
763bed9b 72 </div>
e822fdae 73 </div>
dc8bc31b 74
e822fdae
C
75 <div class="file-to-upload">
76 <div class="file" *ngIf="uploader.queue.length > 0">
77 <span class="filename">{{ filename }}</span>
78 <span class="glyphicon glyphicon-remove" (click)="removeFile()"></span>
79 </div>
763bed9b 80 </div>
dc8bc31b 81
bf57d5ee
C
82 <div *ngIf="fileError" class="alert alert-danger">
83 {{ fileError }}
84 </div>
85
dc8bc31b
C
86 <div class="form-group">
87 <label for="description">Description</label>
88 <textarea
4b2f33f3
C
89 id="description" class="form-control" placeholder="Description..."
90 formControlName="description"
dc8bc31b
C
91 >
92 </textarea>
4b2f33f3
C
93 <div *ngIf="formErrors.description" class="alert alert-danger">
94 {{ formErrors.description }}
dc8bc31b
C
95 </div>
96 </div>
97
e822fdae
C
98 <div class="progress">
99 <progressbar [value]="uploader.progress" max="100"></progressbar>
dc8bc31b
C
100 </div>
101
e822fdae
C
102 <div class="form-group">
103 <input
46485303 104 type="button" value="Upload" class="btn btn-default form-control"
46485303 105 (click)="upload()"
e822fdae
C
106 >
107 </div>
dc8bc31b 108</form>