diff options
Diffstat (limited to 'client/src/app/videos/video-add')
-rw-r--r-- | client/src/app/videos/video-add/video-add.component.html | 8 | ||||
-rw-r--r-- | client/src/app/videos/video-add/video-add.component.ts | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/client/src/app/videos/video-add/video-add.component.html b/client/src/app/videos/video-add/video-add.component.html index 97a3c846a..a3c25c14b 100644 --- a/client/src/app/videos/video-add/video-add.component.html +++ b/client/src/app/videos/video-add/video-add.component.html | |||
@@ -15,6 +15,14 @@ | |||
15 | </div> | 15 | </div> |
16 | 16 | ||
17 | <div class="form-group"> | 17 | <div class="form-group"> |
18 | <label for="nsfw">NSFW</label> | ||
19 | <input | ||
20 | type="checkbox" id="nsfw" | ||
21 | formControlName="nsfw" | ||
22 | > | ||
23 | </div> | ||
24 | |||
25 | <div class="form-group"> | ||
18 | <label for="category">Category</label> | 26 | <label for="category">Category</label> |
19 | <select class="form-control" id="category" formControlName="category"> | 27 | <select class="form-control" id="category" formControlName="category"> |
20 | <option></option> | 28 | <option></option> |
diff --git a/client/src/app/videos/video-add/video-add.component.ts b/client/src/app/videos/video-add/video-add.component.ts index 8fae233d3..ea7ad2e5c 100644 --- a/client/src/app/videos/video-add/video-add.component.ts +++ b/client/src/app/videos/video-add/video-add.component.ts | |||
@@ -71,6 +71,7 @@ export class VideoAddComponent extends FormReactive implements OnInit { | |||
71 | buildForm() { | 71 | buildForm() { |
72 | this.form = this.formBuilder.group({ | 72 | this.form = this.formBuilder.group({ |
73 | name: [ '', VIDEO_NAME.VALIDATORS ], | 73 | name: [ '', VIDEO_NAME.VALIDATORS ], |
74 | nsfw: [ false ], | ||
74 | category: [ '', VIDEO_CATEGORY.VALIDATORS ], | 75 | category: [ '', VIDEO_CATEGORY.VALIDATORS ], |
75 | licence: [ '', VIDEO_LICENCE.VALIDATORS ], | 76 | licence: [ '', VIDEO_LICENCE.VALIDATORS ], |
76 | description: [ '', VIDEO_DESCRIPTION.VALIDATORS ], | 77 | description: [ '', VIDEO_DESCRIPTION.VALIDATORS ], |
@@ -93,12 +94,14 @@ export class VideoAddComponent extends FormReactive implements OnInit { | |||
93 | 94 | ||
94 | this.uploader.onBuildItemForm = (item, form) => { | 95 | this.uploader.onBuildItemForm = (item, form) => { |
95 | const name = this.form.value['name']; | 96 | const name = this.form.value['name']; |
97 | const nsfw = this.form.value['nsfw']; | ||
96 | const category = this.form.value['category']; | 98 | const category = this.form.value['category']; |
97 | const licence = this.form.value['licence']; | 99 | const licence = this.form.value['licence']; |
98 | const description = this.form.value['description']; | 100 | const description = this.form.value['description']; |
99 | 101 | ||
100 | form.append('name', name); | 102 | form.append('name', name); |
101 | form.append('category', category); | 103 | form.append('category', category); |
104 | form.append('nsfw', nsfw); | ||
102 | form.append('licence', licence); | 105 | form.append('licence', licence); |
103 | form.append('description', description); | 106 | form.append('description', description); |
104 | 107 | ||