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=
"category">Category
</label>
19 <select class=
"form-control" id=
"category" formControlName=
"category">
21 <option *
ngFor=
"let category of videoCategories" [value]=
"category.id">{{ category.label }}
</option>
24 <div *
ngIf=
"formErrors.category" class=
"alert alert-danger">
25 {{ formErrors.category }}
29 <div class=
"form-group">
30 <label for=
"licence">Licence
</label>
31 <select class=
"form-control" id=
"licence" formControlName=
"licence">
33 <option *
ngFor=
"let licence of videoLicences" [value]=
"licence.id">{{ licence.label }}
</option>
36 <div *
ngIf=
"formErrors.licence" class=
"alert alert-danger">
37 {{ formErrors.licence }}
41 <div class=
"form-group">
42 <label for=
"tags">Tags
</label> <span class=
"little-information">(press enter to add the tag)
</span>
44 type=
"text" class=
"form-control" id=
"currentTag"
45 formControlName=
"currentTag" (keyup)=
"onTagKeyPress($event)"
47 <div *
ngIf=
"formErrors.currentTag" class=
"alert alert-danger">
48 {{ formErrors.currentTag }}
53 <div class=
"label label-primary tag" *
ngFor=
"let tag of tags">
55 <span class=
"remove" (click)=
"removeTag(tag)">x
</span>
59 <div *
ngIf=
"tagsError" class=
"alert alert-danger">
63 <div class=
"form-group">
64 <label for=
"videofile">File
</label>
65 <div class=
"btn btn-default btn-file" [ngClass]=
"{ 'disabled': filename !== null }" >
66 <span>Select the video...
</span>
68 type=
"file" name=
"videofile" id=
"videofile"
69 ng2FileSelect [uploader]=
"uploader" [disabled]=
"filename !== null"
70 (change)=
"fileChanged()"
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>
82 <div *
ngIf=
"fileError" class=
"alert alert-danger">
86 <div class=
"form-group">
87 <label for=
"description">Description
</label>
89 id=
"description" class=
"form-control" placeholder=
"Description..."
90 formControlName=
"description"
93 <div *
ngIf=
"formErrors.description" class=
"alert alert-danger">
94 {{ formErrors.description }}
98 <div class=
"progress">
99 <progressbar [value]=
"uploader.progress" max=
"100"></progressbar>
102 <div class=
"form-group">
104 type=
"button" value=
"Upload" class=
"btn btn-default form-control"