diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-25 11:01:53 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-25 11:01:53 +0200 |
commit | b4a929accf576edc733fde75a81dfad9a3d288ed (patch) | |
tree | dbf7e0acca829b5fed3a363fe7b8e3f80041558f /client/src/app/shared/forms/form-validators/user-validators.service.ts | |
parent | b2c60abe6e1637d8f55688ffcbf99cf553ed52ea (diff) | |
download | PeerTube-b4a929accf576edc733fde75a81dfad9a3d288ed.tar.gz PeerTube-b4a929accf576edc733fde75a81dfad9a3d288ed.tar.zst PeerTube-b4a929accf576edc733fde75a81dfad9a3d288ed.zip |
Add "agree to the terms" checkbox in registration form
Diffstat (limited to 'client/src/app/shared/forms/form-validators/user-validators.service.ts')
-rw-r--r-- | client/src/app/shared/forms/form-validators/user-validators.service.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-validators/user-validators.service.ts b/client/src/app/shared/forms/form-validators/user-validators.service.ts index bb6ff2068..5edae2e38 100644 --- a/client/src/app/shared/forms/form-validators/user-validators.service.ts +++ b/client/src/app/shared/forms/form-validators/user-validators.service.ts | |||
@@ -12,6 +12,7 @@ export class UserValidatorsService { | |||
12 | readonly USER_ROLE: BuildFormValidator | 12 | readonly USER_ROLE: BuildFormValidator |
13 | readonly USER_DISPLAY_NAME: BuildFormValidator | 13 | readonly USER_DISPLAY_NAME: BuildFormValidator |
14 | readonly USER_DESCRIPTION: BuildFormValidator | 14 | readonly USER_DESCRIPTION: BuildFormValidator |
15 | readonly USER_TERMS: BuildFormValidator | ||
15 | 16 | ||
16 | constructor (private i18n: I18n) { | 17 | constructor (private i18n: I18n) { |
17 | 18 | ||
@@ -89,5 +90,14 @@ export class UserValidatorsService { | |||
89 | 'maxlength': this.i18n('Description cannot be more than 250 characters long.') | 90 | 'maxlength': this.i18n('Description cannot be more than 250 characters long.') |
90 | } | 91 | } |
91 | } | 92 | } |
93 | |||
94 | this.USER_TERMS = { | ||
95 | VALIDATORS: [ | ||
96 | Validators.requiredTrue | ||
97 | ], | ||
98 | MESSAGES: { | ||
99 | 'required': this.i18n('You must to agree with the instance terms in order to registering on it.') | ||
100 | } | ||
101 | } | ||
92 | } | 102 | } |
93 | } | 103 | } |