diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-13 11:54:11 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-14 09:27:17 +0200 |
commit | efc9e8450a8bbeeef9cd18e3ad6037abc0f815c3 (patch) | |
tree | 4698ca4a1e0ddca385a99cd5ae3628d666f28b7d /client/src/app/shared/forms | |
parent | 7f7680641b6e7625d2099ff3ffc28a1a6ec5b9cf (diff) | |
download | PeerTube-efc9e8450a8bbeeef9cd18e3ad6037abc0f815c3.tar.gz PeerTube-efc9e8450a8bbeeef9cd18e3ad6037abc0f815c3.tar.zst PeerTube-efc9e8450a8bbeeef9cd18e3ad6037abc0f815c3.zip |
Add ability to delete and update abuse on client
Diffstat (limited to 'client/src/app/shared/forms')
-rw-r--r-- | client/src/app/shared/forms/form-validators/video-abuse-validators.service.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/video-abuse-validators.service.ts b/client/src/app/shared/forms/form-validators/video-abuse-validators.service.ts index 774e6a488..6e9806611 100644 --- a/client/src/app/shared/forms/form-validators/video-abuse-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/video-abuse-validators.service.ts | |||
@@ -6,6 +6,7 @@ import { BuildFormValidator } from '@app/shared' | |||
6 | @Injectable() | 6 | @Injectable() |
7 | export class VideoAbuseValidatorsService { | 7 | export class VideoAbuseValidatorsService { |
8 | readonly VIDEO_ABUSE_REASON: BuildFormValidator | 8 | readonly VIDEO_ABUSE_REASON: BuildFormValidator |
9 | readonly VIDEO_ABUSE_MODERATION_COMMENT: BuildFormValidator | ||
9 | 10 | ||
10 | constructor (private i18n: I18n) { | 11 | constructor (private i18n: I18n) { |
11 | this.VIDEO_ABUSE_REASON = { | 12 | this.VIDEO_ABUSE_REASON = { |
@@ -16,5 +17,14 @@ export class VideoAbuseValidatorsService { | |||
16 | 'maxlength': this.i18n('Report reason cannot be more than 300 characters long.') | 17 | 'maxlength': this.i18n('Report reason cannot be more than 300 characters long.') |
17 | } | 18 | } |
18 | } | 19 | } |
20 | |||
21 | this.VIDEO_ABUSE_MODERATION_COMMENT = { | ||
22 | VALIDATORS: [ Validators.required, Validators.minLength(2), Validators.maxLength(300) ], | ||
23 | MESSAGES: { | ||
24 | 'required': this.i18n('Moderation comment is required.'), | ||
25 | 'minlength': this.i18n('Moderation comment must be at least 2 characters long.'), | ||
26 | 'maxlength': this.i18n('Moderation comment cannot be more than 300 characters long.') | ||
27 | } | ||
28 | } | ||
19 | } | 29 | } |
20 | } | 30 | } |