]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/videos/video-add/video-add.component.html
Client: Handle NSFW video
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / video-add / video-add.component.html
1 <h3>Upload a video</h3>
2
3 <div *ngIf="error" class="alert alert-danger">{{ error }}</div>
4
5 <form novalidate [formGroup]="form">
6 <div class="form-group">
7 <label for="name">Name</label>
8 <input
9 type="text" class="form-control" id="name"
10 formControlName="name"
11 >
12 <div *ngIf="formErrors.name" class="alert alert-danger">
13 {{ formErrors.name }}
14 </div>
15 </div>
16
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
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
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
49 <div class="form-group">
50 <label for="tags">Tags</label> <span class="little-information">(press enter to add the tag)</span>
51 <input
52 type="text" class="form-control" id="currentTag"
53 formControlName="currentTag" (keyup)="onTagKeyPress($event)"
54 >
55 <div *ngIf="formErrors.currentTag" class="alert alert-danger">
56 {{ formErrors.currentTag }}
57 </div>
58 </div>
59
60 <div class="tags">
61 <div class="label label-primary tag" *ngFor="let tag of tags">
62 {{ tag }}
63 <span class="remove" (click)="removeTag(tag)">x</span>
64 </div>
65 </div>
66
67 <div *ngIf="tagsError" class="alert alert-danger">
68 {{ tagsError }}
69 </div>
70
71 <div class="form-group">
72 <label for="videofile">File</label>
73 <div class="btn btn-default btn-file" [ngClass]="{ 'disabled': filename !== null }" >
74 <span>Select the video...</span>
75 <input
76 type="file" name="videofile" id="videofile"
77 ng2FileSelect [uploader]="uploader" [disabled]="filename !== null"
78 (change)="fileChanged()"
79 >
80 </div>
81 </div>
82
83 <div class="file-to-upload">
84 <div class="file" *ngIf="uploader.queue.length > 0">
85 <span class="filename">{{ filename }}</span>
86 <span class="glyphicon glyphicon-remove" (click)="removeFile()"></span>
87 </div>
88 </div>
89
90 <div *ngIf="fileError" class="alert alert-danger">
91 {{ fileError }}
92 </div>
93
94 <div class="form-group">
95 <label for="description">Description</label>
96 <textarea
97 id="description" class="form-control" placeholder="Description..."
98 formControlName="description"
99 >
100 </textarea>
101 <div *ngIf="formErrors.description" class="alert alert-danger">
102 {{ formErrors.description }}
103 </div>
104 </div>
105
106 <div class="progress">
107 <progressbar [value]="uploader.progress" max="100"></progressbar>
108 </div>
109
110 <div class="form-group">
111 <input
112 type="button" value="Upload" class="btn btn-default form-control"
113 (click)="upload()"
114 >
115 </div>
116 </form>