1 <h3>Upload a video
</h3>
3 <div *
ngIf=
"error" class=
"alert alert-danger">{{ error }}
</div>
5 <form novalidate [formGroup]=
"form">
6 <div class=
"form-group">
7 <label for=
"name">Name
</label>
9 type=
"text" class=
"form-control" id=
"name"
10 formControlName=
"name"
12 <div *
ngIf=
"formErrors.name" class=
"alert alert-danger">
17 <div class=
"form-group">
18 <label for=
"nsfw">NSFW
</label>
20 type=
"checkbox" id=
"nsfw"
21 formControlName=
"nsfw"
25 <div class=
"form-group">
26 <label for=
"category">Category
</label>
27 <select class=
"form-control" id=
"category" formControlName=
"category">
29 <option *
ngFor=
"let category of videoCategories" [value]=
"category.id">{{ category.label }}
</option>
32 <div *
ngIf=
"formErrors.category" class=
"alert alert-danger">
33 {{ formErrors.category }}
37 <div class=
"form-group">
38 <label for=
"licence">Licence
</label>
39 <select class=
"form-control" id=
"licence" formControlName=
"licence">
41 <option *
ngFor=
"let licence of videoLicences" [value]=
"licence.id">{{ licence.label }}
</option>
44 <div *
ngIf=
"formErrors.licence" class=
"alert alert-danger">
45 {{ formErrors.licence }}
49 <div class=
"form-group">
50 <label for=
"language">Language
</label>
51 <select class=
"form-control" id=
"language" formControlName=
"language">
53 <option *
ngFor=
"let language of videoLanguages" [value]=
"language.id">{{ language.label }}
</option>
56 <div *
ngIf=
"formErrors.language" class=
"alert alert-danger">
57 {{ formErrors.language }}
61 <div class=
"form-group">
62 <label for=
"tags">Tags
</label> <span class=
"little-information">(press enter to add the tag)
</span>
64 type=
"text" class=
"form-control" id=
"currentTag"
65 formControlName=
"currentTag" (keyup)=
"onTagKeyPress($event)"
67 <div *
ngIf=
"formErrors.currentTag" class=
"alert alert-danger">
68 {{ formErrors.currentTag }}
73 <div class=
"label label-primary tag" *
ngFor=
"let tag of tags">
75 <span class=
"remove" (click)=
"removeTag(tag)">x
</span>
79 <div *
ngIf=
"tagsError" class=
"alert alert-danger">
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>
88 type=
"file" name=
"videofile" id=
"videofile"
89 ng2FileSelect [uploader]=
"uploader" [disabled]=
"filename !== null"
90 (change)=
"fileChanged()"
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>
102 <div *
ngIf=
"fileError" class=
"alert alert-danger">
106 <div class=
"form-group">
107 <label for=
"description">Description
</label>
109 id=
"description" class=
"form-control" placeholder=
"Description..."
110 formControlName=
"description"
113 <div *
ngIf=
"formErrors.description" class=
"alert alert-danger">
114 {{ formErrors.description }}
118 <div class=
"progress">
119 <progressbar [value]=
"uploader.progress" max=
"100"></progressbar>
122 <div class=
"form-group">
124 type=
"button" value=
"Upload" class=
"btn btn-default form-control"