2016-03-14 07:50:19 -05:00
|
|
|
<h3>Upload a video</h3>
|
|
|
|
|
|
|
|
<form (ngSubmit)="uploadFile()" #videoForm="ngForm">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="name">Video name</label>
|
|
|
|
<input
|
|
|
|
type="text" class="form-control" name="name" id="name" required
|
|
|
|
ngControl="name" #name="ngForm"
|
|
|
|
>
|
|
|
|
<div [hidden]="name.valid || name.pristine" class="alert alert-danger">
|
|
|
|
Name is required
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2016-03-16 14:59:56 -05:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="btn btn-default btn-file">
|
|
|
|
<span>Select the video...</span>
|
2016-03-18 10:44:54 -05:00
|
|
|
<input type="file" name="videofile" id="videofile">
|
2016-03-16 14:59:56 -05:00
|
|
|
</div>
|
2016-03-14 07:50:19 -05:00
|
|
|
|
2016-03-16 14:59:56 -05:00
|
|
|
<span *ngIf="fileToUpload">{{ fileToUpload.name }}</span>
|
|
|
|
</div>
|
2016-03-14 07:50:19 -05:00
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="description">Description</label>
|
|
|
|
<textarea
|
|
|
|
name="description" id="description" class="form-control" placeholder="Description..." required
|
|
|
|
ngControl="description" #description="ngForm"
|
|
|
|
>
|
|
|
|
</textarea>
|
|
|
|
<div [hidden]="description.valid || description.pristine" class="alert alert-danger">
|
|
|
|
A description is required
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="progress" *ngIf="progressBar.max !== 0">
|
|
|
|
<progress [value]="progressBar.value" [max]="progressBar.max"></progress>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="submit" value="Upload" class="btn btn-default" [disabled]="!videoForm.form.valid || !fileToUpload">
|
|
|
|
</form>
|