aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-edit/shared
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/+video-edit/shared')
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.html13
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.scss4
-rw-r--r--client/src/app/videos/+video-edit/shared/video-edit.component.ts5
-rw-r--r--client/src/app/videos/+video-edit/shared/video-image.component.scss2
4 files changed, 21 insertions, 3 deletions
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.html b/client/src/app/videos/+video-edit/shared/video-edit.component.html
index 899249778..bf2204013 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.html
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.html
@@ -111,7 +111,7 @@
111 </tab> 111 </tab>
112 112
113 <tab heading="Advanced settings"> 113 <tab heading="Advanced settings">
114 <div class="col-md-12"> 114 <div class="col-md-12 advanced-settings">
115 <div class="form-group"> 115 <div class="form-group">
116 <my-video-image 116 <my-video-image
117 inputLabel="Upload thumbnail" inputName="thumbnailfile" formControlName="thumbnailfile" 117 inputLabel="Upload thumbnail" inputName="thumbnailfile" formControlName="thumbnailfile"
@@ -125,6 +125,17 @@
125 previewWidth="360px" previewHeight="200px" 125 previewWidth="360px" previewHeight="200px"
126 ></my-video-image> 126 ></my-video-image>
127 </div> 127 </div>
128
129 <div class="form-group">
130 <label for="support">Support (markdown)</label>
131 <my-markdown-textarea
132 id="support" formControlName="support" textareaWidth="500px" [previewColumn]="true" markdownType="enhanced"
133 [classes]="{ 'input-error': formErrors['support'] }"
134 ></my-markdown-textarea>
135 <div *ngIf="formErrors.support" class="form-error">
136 {{ formErrors.support }}
137 </div>
138 </div>
128 </div> 139 </div>
129 </tab> 140 </tab>
130 141
diff --git a/client/src/app/videos/+video-edit/shared/video-edit.component.scss b/client/src/app/videos/+video-edit/shared/video-edit.component.scss
index f78336fa8..1317f7426 100644
--- a/client/src/app/videos/+video-edit/shared/video-edit.component.scss
+++ b/client/src/app/videos/+video-edit/shared/video-edit.component.scss
@@ -59,6 +59,10 @@
59 padding: 0 15px !important; 59 padding: 0 15px !important;
60 } 60 }
61 } 61 }
62
63 .advanced-settings .form-group {
64 margin-bottom: 20px;
65 }
62} 66}
63 67
64.submit-container { 68.submit-container {
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 85e5cc3f5..c26906551 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
@@ -1,7 +1,7 @@
1import { Component, Input, OnInit } from '@angular/core' 1import { Component, Input, OnInit } from '@angular/core'
2import { FormBuilder, FormControl, FormGroup } from '@angular/forms' 2import { FormBuilder, FormControl, FormGroup } from '@angular/forms'
3import { ActivatedRoute, Router } from '@angular/router' 3import { ActivatedRoute, Router } from '@angular/router'
4import { VIDEO_IMAGE } from '@app/shared' 4import { VIDEO_IMAGE, VIDEO_SUPPORT } from '@app/shared'
5import { NotificationsService } from 'angular2-notifications' 5import { NotificationsService } from 'angular2-notifications'
6import 'rxjs/add/observable/forkJoin' 6import 'rxjs/add/observable/forkJoin'
7import { ServerService } from '../../../core/server' 7import { ServerService } from '../../../core/server'
@@ -60,6 +60,7 @@ export class VideoEditComponent implements OnInit {
60 this.formErrors['description'] = '' 60 this.formErrors['description'] = ''
61 this.formErrors['thumbnailfile'] = '' 61 this.formErrors['thumbnailfile'] = ''
62 this.formErrors['previewfile'] = '' 62 this.formErrors['previewfile'] = ''
63 this.formErrors['support'] = ''
63 64
64 this.validationMessages['name'] = VIDEO_NAME.MESSAGES 65 this.validationMessages['name'] = VIDEO_NAME.MESSAGES
65 this.validationMessages['privacy'] = VIDEO_PRIVACY.MESSAGES 66 this.validationMessages['privacy'] = VIDEO_PRIVACY.MESSAGES
@@ -70,6 +71,7 @@ export class VideoEditComponent implements OnInit {
70 this.validationMessages['description'] = VIDEO_DESCRIPTION.MESSAGES 71 this.validationMessages['description'] = VIDEO_DESCRIPTION.MESSAGES
71 this.validationMessages['thumbnailfile'] = VIDEO_IMAGE.MESSAGES 72 this.validationMessages['thumbnailfile'] = VIDEO_IMAGE.MESSAGES
72 this.validationMessages['previewfile'] = VIDEO_IMAGE.MESSAGES 73 this.validationMessages['previewfile'] = VIDEO_IMAGE.MESSAGES
74 this.validationMessages['support'] = VIDEO_SUPPORT.MESSAGES
73 75
74 this.form.addControl('name', new FormControl('', VIDEO_NAME.VALIDATORS)) 76 this.form.addControl('name', new FormControl('', VIDEO_NAME.VALIDATORS))
75 this.form.addControl('privacy', new FormControl('', VIDEO_PRIVACY.VALIDATORS)) 77 this.form.addControl('privacy', new FormControl('', VIDEO_PRIVACY.VALIDATORS))
@@ -83,6 +85,7 @@ export class VideoEditComponent implements OnInit {
83 this.form.addControl('tags', new FormControl('')) 85 this.form.addControl('tags', new FormControl(''))
84 this.form.addControl('thumbnailfile', new FormControl('')) 86 this.form.addControl('thumbnailfile', new FormControl(''))
85 this.form.addControl('previewfile', new FormControl('')) 87 this.form.addControl('previewfile', new FormControl(''))
88 this.form.addControl('support', new FormControl(''))
86 } 89 }
87 90
88 ngOnInit () { 91 ngOnInit () {
diff --git a/client/src/app/videos/+video-edit/shared/video-image.component.scss b/client/src/app/videos/+video-edit/shared/video-image.component.scss
index c44d00b3c..98313536e 100644
--- a/client/src/app/videos/+video-edit/shared/video-image.component.scss
+++ b/client/src/app/videos/+video-edit/shared/video-image.component.scss
@@ -2,7 +2,7 @@
2@import '_mixins'; 2@import '_mixins';
3 3
4.root { 4.root {
5 height: 150px; 5 height: auto;
6 display: flex; 6 display: flex;
7 align-items: center; 7 align-items: center;
8 8