aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/shared/video-edit.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-20 14:29:55 +0100
committerChocobozzz <me@florianbigard.com>2017-12-20 14:29:55 +0100
commit15a7387da888492068e2ce3d1e39639d142f6c6e (patch)
tree8eaec71d11c19a97dc99e4d9812dfc0c646dd9e7 /client/src/app/videos/+video-edit/shared/video-edit.component.ts
parenta4b8a4ddccc926e0670d3687cccd52496f6f8a8f (diff)
downloadPeerTube-15a7387da888492068e2ce3d1e39639d142f6c6e.tar.gz
PeerTube-15a7387da888492068e2ce3d1e39639d142f6c6e.tar.zst
PeerTube-15a7387da888492068e2ce3d1e39639d142f6c6e.zip
Customize select
Diffstat (limited to 'client/src/app/videos/+video-edit/shared/video-edit.component.ts')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.ts b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
index 28c9134a7..7fe265284 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.ts
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.ts
@@ -4,6 +4,7 @@ import { ActivatedRoute, Router } from '@angular/router'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import 'rxjs/add/observable/forkJoin' 5import 'rxjs/add/observable/forkJoin'
6import { ServerService } from '../../../core/server' 6import { ServerService } from '../../../core/server'
7import { VIDEO_CHANNEL } from '../../../shared/forms/form-validators'
7import { ValidatorMessage } from '../../../shared/forms/form-validators/validator-message' 8import { ValidatorMessage } from '../../../shared/forms/form-validators/validator-message'
8import { 9import {
9 VIDEO_CATEGORY, 10 VIDEO_CATEGORY,
@@ -27,6 +28,7 @@ export class VideoEditComponent implements OnInit {
27 @Input() formErrors: { [ id: string ]: string } = {} 28 @Input() formErrors: { [ id: string ]: string } = {}
28 @Input() validationMessages: ValidatorMessage = {} 29 @Input() validationMessages: ValidatorMessage = {}
29 @Input() videoPrivacies = [] 30 @Input() videoPrivacies = []
31 @Input() userVideoChannels = []
30 32
31 tags: string[] = [] 33 tags: string[] = []
32 videoCategories = [] 34 videoCategories = []
@@ -50,6 +52,7 @@ export class VideoEditComponent implements OnInit {
50 updateForm () { 52 updateForm () {
51 this.formErrors['name'] = '' 53 this.formErrors['name'] = ''
52 this.formErrors['privacy'] = '' 54 this.formErrors['privacy'] = ''
55 this.formErrors['channelId'] = ''
53 this.formErrors['category'] = '' 56 this.formErrors['category'] = ''
54 this.formErrors['licence'] = '' 57 this.formErrors['licence'] = ''
55 this.formErrors['language'] = '' 58 this.formErrors['language'] = ''
@@ -57,6 +60,7 @@ export class VideoEditComponent implements OnInit {
57 60
58 this.validationMessages['name'] = VIDEO_NAME.MESSAGES 61 this.validationMessages['name'] = VIDEO_NAME.MESSAGES
59 this.validationMessages['privacy'] = VIDEO_PRIVACY.MESSAGES 62 this.validationMessages['privacy'] = VIDEO_PRIVACY.MESSAGES
63 this.validationMessages['channelId'] = VIDEO_CHANNEL.MESSAGES
60 this.validationMessages['category'] = VIDEO_CATEGORY.MESSAGES 64 this.validationMessages['category'] = VIDEO_CATEGORY.MESSAGES
61 this.validationMessages['licence'] = VIDEO_LICENCE.MESSAGES 65 this.validationMessages['licence'] = VIDEO_LICENCE.MESSAGES
62 this.validationMessages['language'] = VIDEO_LANGUAGE.MESSAGES 66 this.validationMessages['language'] = VIDEO_LANGUAGE.MESSAGES
@@ -64,6 +68,7 @@ export class VideoEditComponent implements OnInit {
64 68
65 this.form.addControl('name', new FormControl('', VIDEO_NAME.VALIDATORS)) 69 this.form.addControl('name', new FormControl('', VIDEO_NAME.VALIDATORS))
66 this.form.addControl('privacy', new FormControl('', VIDEO_PRIVACY.VALIDATORS)) 70 this.form.addControl('privacy', new FormControl('', VIDEO_PRIVACY.VALIDATORS))
71 this.form.addControl('channelId', new FormControl({ value: '', disabled: true }))
67 this.form.addControl('nsfw', new FormControl(false)) 72 this.form.addControl('nsfw', new FormControl(false))
68 this.form.addControl('category', new FormControl('', VIDEO_CATEGORY.VALIDATORS)) 73 this.form.addControl('category', new FormControl('', VIDEO_CATEGORY.VALIDATORS))
69 this.form.addControl('licence', new FormControl('', VIDEO_LICENCE.VALIDATORS)) 74 this.form.addControl('licence', new FormControl('', VIDEO_LICENCE.VALIDATORS))