aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/video-add.component.html
blob: 6883f828023c113dd74b1e49cd8dad06bd2f6228 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div class="margin-content">
  <div class="title-page title-page-single">
    Upload your video
  </div>

  <div *ngIf="error" class="alert alert-danger">{{ error }}</div>

  <div *ngIf="!isUploadingVideo" class="upload-video-container">
    <div class="upload-video">
      <div class="icon icon-upload"></div>

      <div class="button-file">
        <span>Select the file to upload</span>
        <input #videofileInput type="file" name="videofile" id="videofile" (change)="fileChange()" />
      </div>

      <div class="form-group">
        <select [(ngModel)]="firstStepPrivacy">
          <option *ngFor="let privacy of videoPrivacies" [value]="privacy.id">{{ privacy.label }}</option>
        </select>
      </div>

      <div class="form-group">
        <select [(ngModel)]="firstStepChannel">
          <option *ngFor="let channel of userVideoChannels" [value]="channel.id">{{ channel.label }}</option>
        </select>
      </div>
    </div>
  </div>

  <p-progressBar *ngIf="isUploadingVideo" [value]="videoUploadPercents"></p-progressBar>

  <!-- Hidden because we need to load the component -->
  <form [hidden]="!isUploadingVideo" novalidate [formGroup]="form">
    <my-video-edit
        [form]="form" [formErrors]="formErrors"
        [validationMessages]="validationMessages" [videoPrivacies]="videoPrivacies"
    ></my-video-edit>

    <div class="submit-container">
      <div class="submit-button" [ngClass]="{ disabled: !form.valid }">
        <span class="icon icon-validate"></span>
        <input type="button" value="Publish" (click)="upload()" />
      </div>
    </div>
  </form>
</div>