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=
"tags">Tags
</label> <span class=
"little-information">(press enter to add the tag)
</span>
32 type=
"text" class=
"form-control" id=
"currentTag"
33 formControlName=
"currentTag" (keyup)=
"onTagKeyPress($event)"
35 <div *
ngIf=
"formErrors.currentTag" class=
"alert alert-danger">
36 {{ formErrors.currentTag }}
41 <div class=
"label label-primary tag" *
ngFor=
"let tag of tags">
43 <span class=
"remove" (click)=
"removeTag(tag)">x
</span>
47 <div *
ngIf=
"tagsError" class=
"alert alert-danger">
51 <div class=
"form-group">
52 <label for=
"videofile">File
</label>
53 <div class=
"btn btn-default btn-file" [ngClass]=
"{ 'disabled': filename !== null }" >
54 <span>Select the video...
</span>
56 type=
"file" name=
"videofile" id=
"videofile"
57 ng2FileSelect [uploader]=
"uploader" [disabled]=
"filename !== null"
58 (change)=
"fileChanged()"
63 <div class=
"file-to-upload">
64 <div class=
"file" *
ngIf=
"uploader.queue.length > 0">
65 <span class=
"filename">{{ filename }}
</span>
66 <span class=
"glyphicon glyphicon-remove" (click)=
"removeFile()"></span>
70 <div *
ngIf=
"fileError" class=
"alert alert-danger">
74 <div class=
"form-group">
75 <label for=
"description">Description
</label>
77 id=
"description" class=
"form-control" placeholder=
"Description..."
78 formControlName=
"description"
81 <div *
ngIf=
"formErrors.description" class=
"alert alert-danger">
82 {{ formErrors.description }}
86 <div class=
"progress">
87 <progressbar [value]=
"uploader.progress" max=
"100"></progressbar>
90 <div class=
"form-group">
92 type=
"button" value=
"Upload" class=
"btn btn-default form-control"