diff options
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.ts | 5 |
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' | |||
4 | import { NotificationsService } from 'angular2-notifications' | 4 | import { NotificationsService } from 'angular2-notifications' |
5 | import 'rxjs/add/observable/forkJoin' | 5 | import 'rxjs/add/observable/forkJoin' |
6 | import { ServerService } from '../../../core/server' | 6 | import { ServerService } from '../../../core/server' |
7 | import { VIDEO_CHANNEL } from '../../../shared/forms/form-validators' | ||
7 | import { ValidatorMessage } from '../../../shared/forms/form-validators/validator-message' | 8 | import { ValidatorMessage } from '../../../shared/forms/form-validators/validator-message' |
8 | import { | 9 | import { |
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)) |