aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/signup
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-07-25 11:01:53 +0200
committerChocobozzz <me@florianbigard.com>2018-07-25 11:01:53 +0200
commitb4a929accf576edc733fde75a81dfad9a3d288ed (patch)
treedbf7e0acca829b5fed3a363fe7b8e3f80041558f /client/src/app/signup
parentb2c60abe6e1637d8f55688ffcbf99cf553ed52ea (diff)
downloadPeerTube-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/signup')
-rw-r--r--client/src/app/signup/signup.component.html11
-rw-r--r--client/src/app/signup/signup.component.scss3
-rw-r--r--client/src/app/signup/signup.component.ts3
3 files changed, 16 insertions, 1 deletions
diff --git a/client/src/app/signup/signup.component.html b/client/src/app/signup/signup.component.html
index 2fe9a4281..565b695d9 100644
--- a/client/src/app/signup/signup.component.html
+++ b/client/src/app/signup/signup.component.html
@@ -54,6 +54,17 @@
54 </div> 54 </div>
55 </div> 55 </div>
56 56
57 <div class="form-group form-group-terms">
58 <my-peertube-checkbox
59 inputName="terms" formControlName="terms"
60 i18n-labelHtml labelHtml="I have read and agree to the <a href='/about/instance#terms-section' target='_blank'rel='noopener noreferrer'>Terms</a> of this instance"
61 ></my-peertube-checkbox>
62
63 <div *ngIf="formErrors.terms" class="form-error">
64 {{ formErrors.terms }}
65 </div>
66 </div>
67
57 <input type="submit" i18n-value value="Signup" [disabled]="!form.valid"> 68 <input type="submit" i18n-value value="Signup" [disabled]="!form.valid">
58 </form> 69 </form>
59 70
diff --git a/client/src/app/signup/signup.component.scss b/client/src/app/signup/signup.component.scss
index 8ea4ec997..e6d484297 100644
--- a/client/src/app/signup/signup.component.scss
+++ b/client/src/app/signup/signup.component.scss
@@ -10,6 +10,9 @@
10 } 10 }
11} 11}
12 12
13.form-group-terms {
14 margin: 30px 0;
15}
13 16
14input:not([type=submit]) { 17input:not([type=submit]) {
15 @include peertube-input-text(340px); 18 @include peertube-input-text(340px);
diff --git a/client/src/app/signup/signup.component.ts b/client/src/app/signup/signup.component.ts
index 53d144572..076dac454 100644
--- a/client/src/app/signup/signup.component.ts
+++ b/client/src/app/signup/signup.component.ts
@@ -38,7 +38,8 @@ export class SignupComponent extends FormReactive implements OnInit {
38 this.buildForm({ 38 this.buildForm({
39 username: this.userValidatorsService.USER_USERNAME, 39 username: this.userValidatorsService.USER_USERNAME,
40 password: this.userValidatorsService.USER_PASSWORD, 40 password: this.userValidatorsService.USER_PASSWORD,
41 email: this.userValidatorsService.USER_EMAIL 41 email: this.userValidatorsService.USER_EMAIL,
42 terms: this.userValidatorsService.USER_TERMS
42 }) 43 })
43 44
44 this.serverService.configLoaded 45 this.serverService.configLoaded