diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-04-10 21:15:28 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-04-10 21:16:36 +0200 |
commit | d8e689b864749648d03cf4391fd4a475126f01cd (patch) | |
tree | 299713e3c056873ba6fff5247b8f49a542f0bf45 /client/src/app/videos/video-edit/video-add.component.html | |
parent | a184c71b526000f60f00649d260638723d426e6a (diff) | |
download | PeerTube-d8e689b864749648d03cf4391fd4a475126f01cd.tar.gz PeerTube-d8e689b864749648d03cf4391fd4a475126f01cd.tar.zst PeerTube-d8e689b864749648d03cf4391fd4a475126f01cd.zip |
Client: add basic support for updating a video
Diffstat (limited to 'client/src/app/videos/video-edit/video-add.component.html')
-rw-r--r-- | client/src/app/videos/video-edit/video-add.component.html | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/client/src/app/videos/video-edit/video-add.component.html b/client/src/app/videos/video-edit/video-add.component.html new file mode 100644 index 000000000..104747a8c --- /dev/null +++ b/client/src/app/videos/video-edit/video-add.component.html | |||
@@ -0,0 +1,128 @@ | |||
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="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 | |||
61 | <div class="form-group"> | ||
62 | <label for="tags">Tags</label> <span class="little-information">(press enter to add the tag)</span> | ||
63 | <input | ||
64 | type="text" class="form-control" id="currentTag" | ||
65 | formControlName="currentTag" (keyup)="onTagKeyPress($event)" | ||
66 | > | ||
67 | <div *ngIf="formErrors.currentTag" class="alert alert-danger"> | ||
68 | {{ formErrors.currentTag }} | ||
69 | </div> | ||
70 | </div> | ||
71 | |||
72 | <div class="tags"> | ||
73 | <div class="label label-primary tag" *ngFor="let tag of tags"> | ||
74 | {{ tag }} | ||
75 | <span class="remove" (click)="removeTag(tag)">x</span> | ||
76 | </div> | ||
77 | </div> | ||
78 | |||
79 | <div *ngIf="tagsError" class="alert alert-danger"> | ||
80 | {{ tagsError }} | ||
81 | </div> | ||
82 | |||
83 | <div class="form-group"> | ||
84 | <label for="videofile">File</label> | ||
85 | <div class="btn btn-default btn-file" [ngClass]="{ 'disabled': filename !== null }" > | ||
86 | <span>Select the video...</span> | ||
87 | <input | ||
88 | type="file" name="videofile" id="videofile" | ||
89 | ng2FileSelect [uploader]="uploader" [disabled]="filename !== null" | ||
90 | (change)="fileChanged()" | ||
91 | > | ||
92 | </div> | ||
93 | </div> | ||
94 | |||
95 | <div class="file-to-upload"> | ||
96 | <div class="file" *ngIf="uploader.queue.length > 0"> | ||
97 | <span class="filename">{{ filename }}</span> | ||
98 | <span class="glyphicon glyphicon-remove" (click)="removeFile()"></span> | ||
99 | </div> | ||
100 | </div> | ||
101 | |||
102 | <div *ngIf="fileError" class="alert alert-danger"> | ||
103 | {{ fileError }} | ||
104 | </div> | ||
105 | |||
106 | <div class="form-group"> | ||
107 | <label for="description">Description</label> | ||
108 | <textarea | ||
109 | id="description" class="form-control" placeholder="Description..." | ||
110 | formControlName="description" | ||
111 | > | ||
112 | </textarea> | ||
113 | <div *ngIf="formErrors.description" class="alert alert-danger"> | ||
114 | {{ formErrors.description }} | ||
115 | </div> | ||
116 | </div> | ||
117 | |||
118 | <div class="progress"> | ||
119 | <progressbar [value]="uploader.progress" max="100"></progressbar> | ||
120 | </div> | ||
121 | |||
122 | <div class="form-group"> | ||
123 | <input | ||
124 | type="button" value="Upload" class="btn btn-default form-control" | ||
125 | (click)="upload()" | ||
126 | > | ||
127 | </div> | ||
128 | </form> | ||