2 <div class=
"content-padding">
4 <h3>Upload a video
</h3>
6 <div *
ngIf=
"error" class=
"alert alert-danger">{{ error }}
</div>
8 <form novalidate [formGroup]=
"form">
9 <div class=
"form-group">
10 <label for=
"name">Name
</label>
12 type=
"text" class=
"form-control" id=
"name"
13 formControlName=
"name"
15 <div *
ngIf=
"formErrors.name" class=
"alert alert-danger">
20 <div class=
"form-group">
21 <label for=
"nsfw">NSFW
</label>
23 type=
"checkbox" id=
"nsfw"
24 formControlName=
"nsfw"
28 <div class=
"form-group">
29 <label for=
"category">Category
</label>
30 <select class=
"form-control" id=
"category" formControlName=
"category">
32 <option *
ngFor=
"let category of videoCategories" [value]=
"category.id">{{ category.label }}
</option>
35 <div *
ngIf=
"formErrors.category" class=
"alert alert-danger">
36 {{ formErrors.category }}
40 <div class=
"form-group">
41 <label for=
"licence">Licence
</label>
42 <select class=
"form-control" id=
"licence" formControlName=
"licence">
44 <option *
ngFor=
"let licence of videoLicences" [value]=
"licence.id">{{ licence.label }}
</option>
47 <div *
ngIf=
"formErrors.licence" class=
"alert alert-danger">
48 {{ formErrors.licence }}
52 <div class=
"form-group">
53 <label for=
"language">Language
</label>
54 <select class=
"form-control" id=
"language" formControlName=
"language">
56 <option *
ngFor=
"let language of videoLanguages" [value]=
"language.id">{{ language.label }}
</option>
59 <div *
ngIf=
"formErrors.language" class=
"alert alert-danger">
60 {{ formErrors.language }}
64 <div class=
"form-group">
65 <label for=
"tags" class=
"label-tags">Tags
</label> <span class=
"little-information">(press enter to add the tag)
</span>
67 [ngModel]=
"tags" [validators]=
"tagValidators" [errorMessages]=
"tagValidatorsMessages"
68 formControlName=
"tags" maxItems=
"3" modelAsStrings=
"true"
72 <div class=
"form-group">
73 <label for=
"videofile">File
</label>
74 <div class=
"btn btn-default btn-file" [ngClass]=
"{ 'disabled': filename !== null }" >
75 <span>Select the video...
</span>
77 type=
"file" name=
"videofile" id=
"videofile"
78 ng2FileSelect [uploader]=
"uploader" [disabled]=
"filename !== null"
79 (change)=
"fileChanged()"
84 <div class=
"file-to-upload">
85 <div class=
"file" *
ngIf=
"uploader.queue.length > 0">
86 <span class=
"filename">{{ filename }}
</span>
87 <span class=
"glyphicon glyphicon-remove" (click)=
"removeFile()"></span>
91 <div *
ngIf=
"fileError" class=
"alert alert-danger">
95 <div class=
"form-group">
96 <label for=
"description">Description
</label>
98 id=
"description" class=
"form-control" placeholder=
"Description..."
99 formControlName=
"description"
102 <div *
ngIf=
"formErrors.description" class=
"alert alert-danger">
103 {{ formErrors.description }}
107 <div class=
"progress">
108 <progressbar [value]=
"uploader.progress" max=
"100"></progressbar>
111 <div class=
"form-group">
113 type=
"button" value=
"Upload" class=
"btn btn-default form-control"