2 <div class=
"content-padding">
4 <h3>Upload a video
</h3>
6 <div *
ngIf=
"error !== undefined" 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=
"privacy">Privacy
</label>
22 <select class=
"form-control" id=
"privacy" formControlName=
"privacy">
24 <option *
ngFor=
"let privacy of videoPrivacies" [value]=
"privacy.id">{{ privacy.label }}
</option>
27 <div *
ngIf=
"formErrors.privacy" class=
"alert alert-danger">
28 {{ formErrors.privacy }}
32 <div class=
"form-group">
34 type=
"checkbox" id=
"nsfw"
35 formControlName=
"nsfw"
37 <label for=
"nsfw">This video contains mature or explicit content
</label>
40 <div class=
"form-group">
41 <label for=
"category">Channel
</label>
42 <select class=
"form-control" id=
"channelId" formControlName=
"channelId">
43 <option *
ngFor=
"let channel of userVideoChannels" [value]=
"channel.id">{{ channel.label }}
</option>
46 <div *
ngIf=
"formErrors.channelId" class=
"alert alert-danger">
47 {{ formErrors.channelId }}
51 <div class=
"form-group">
52 <label for=
"category">Category
</label>
53 <select class=
"form-control" id=
"category" formControlName=
"category">
55 <option *
ngFor=
"let category of videoCategories" [value]=
"category.id">{{ category.label }}
</option>
58 <div *
ngIf=
"formErrors.category" class=
"alert alert-danger">
59 {{ formErrors.category }}
63 <div class=
"form-group">
64 <label for=
"licence">Licence
</label>
65 <select class=
"form-control" id=
"licence" formControlName=
"licence">
67 <option *
ngFor=
"let licence of videoLicences" [value]=
"licence.id">{{ licence.label }}
</option>
70 <div *
ngIf=
"formErrors.licence" class=
"alert alert-danger">
71 {{ formErrors.licence }}
75 <div class=
"form-group">
76 <label for=
"language">Language
</label>
77 <select class=
"form-control" id=
"language" formControlName=
"language">
79 <option *
ngFor=
"let language of videoLanguages" [value]=
"language.id">{{ language.label }}
</option>
82 <div *
ngIf=
"formErrors.language" class=
"alert alert-danger">
83 {{ formErrors.language }}
87 <div class=
"form-group">
88 <label class=
"label-tags">Tags
</label> <span class=
"little-information">(press enter to add the tag)
</span>
90 [ngModel]=
"tags" [validators]=
"tagValidators" [errorMessages]=
"tagValidatorsMessages"
91 formControlName=
"tags" maxItems=
"5" modelAsStrings=
"true"
95 <div class=
"form-group">
96 <label for=
"videofile">File
</label>
97 <div class=
"btn btn-default btn-file">
98 <span>Select the video...
</span>
99 <input #videofileInput
type=
"file" name=
"videofile" id=
"videofile" (change)=
"fileChange($event)" />
100 <input type=
"hidden" name=
"videofileHidden" formControlName=
"videofile"/>
104 <div class=
"file-to-upload">
105 <div class=
"file" *
ngIf=
"filename">
106 <span class=
"filename">{{ filename }}
</span>
107 <span class=
"glyphicon glyphicon-remove" (click)=
"removeFile()"></span>
111 <div *
ngIf=
"formErrors.videofile" class=
"alert alert-danger">
112 {{ formErrors.videofile }}
115 <div class=
"form-group">
116 <label for=
"description">Description
</label>
117 <my-video-description formControlName=
"description"></my-video-description>
119 <div *
ngIf=
"formErrors.description" class=
"alert alert-danger">
120 {{ formErrors.description }}
124 <div class=
"progress">
125 <progressbar [value]=
"progressPercent" max=
"100">
126 <ng-template [ngIf]=
"progressPercent === 100">
127 <span class=
"glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
128 Server is processing the video
133 <div class=
"form-group">
135 type=
"button" value=
"Upload" class=
"btn btn-default form-control"