- <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>
+ <ngb-tabset class="video-add-tabset root-tabset bootstrap" [ngClass]="{ 'hide-nav': secondStepType !== undefined }">
+
+ <ngb-tab>
+ <ng-template ngbTabTitle><span i18n>Upload a file</span></ng-template>
+ <ng-template ngbTabContent>
+ <my-video-upload #videoUpload (firstStepDone)="onFirstStepDone('upload', $event)" (firstStepError)="onError()"></my-video-upload>
+ </ng-template>
+ </ngb-tab>
+
+ <ngb-tab *ngIf="isVideoImportHttpEnabled()">
+ <ng-template ngbTabTitle><span i18n>Import with URL</span></ng-template>
+ <ng-template ngbTabContent>
+ <my-video-import-url #videoImportUrl (firstStepDone)="onFirstStepDone('import-url', $event)" (firstStepError)="onError()"></my-video-import-url>
+ </ng-template>
+ </ngb-tab>
+
+ <ngb-tab *ngIf="isVideoImportTorrentEnabled()">
+ <ng-template ngbTabTitle><span i18n>Import with torrent</span></ng-template>
+ <ng-template ngbTabContent>
+ <my-video-import-torrent #videoImportTorrent (firstStepDone)="onFirstStepDone('import-torrent', $event)" (firstStepError)="onError()"></my-video-import-torrent>
+ </ng-template>
+ </ngb-tab>
+ </ngb-tabset>