|
1 | 1 | <section class="sign-up-container">
|
2 | 2 | <h2>Create A Free Account</h2>
|
3 | 3 |
|
4 |
| - <form [formGroup]="signUpForm"></form> |
| 4 | + <form [formGroup]="signUpForm" (ngSubmit)="onSubmit()"> |
| 5 | + <div class="btn-group"> |
| 6 | + <p-button label="Sign up through ORCID" class="form-btn btn-full-width"> |
| 7 | + <!--TODO change img tags to icons(fantasticon)--> |
| 8 | + |
| 9 | + <!--<i class="osf-icon-orcid"></i>--> |
| 10 | + <img |
| 11 | + ngSrc="assets/images/orcid.svg" |
| 12 | + alt="Orchid icon" |
| 13 | + height="20" |
| 14 | + width="20" |
| 15 | + /> |
| 16 | + </p-button> |
| 17 | + <p-button |
| 18 | + label="Sign up through Institution" |
| 19 | + class="form-btn btn-full-width" |
| 20 | + > |
| 21 | + <i class="osf-icon-institutions"></i> |
| 22 | + </p-button> |
| 23 | + </div> |
| 24 | + |
| 25 | + <p-divider align="center"> |
| 26 | + <span class="divider-text">or</span> |
| 27 | + </p-divider> |
| 28 | + |
| 29 | + <div class="form-fields"> |
| 30 | + <div class="field"> |
| 31 | + <label for="fullName">Full Name</label> |
| 32 | + <input |
| 33 | + id="fullName" |
| 34 | + type="text" |
| 35 | + pInputText |
| 36 | + formControlName="fullName" |
| 37 | + placeholder="John Doe" |
| 38 | + autocomplete="full-name" |
| 39 | + /> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div class="field"> |
| 43 | + <label for="email">Email</label> |
| 44 | + <input |
| 45 | + id="email" |
| 46 | + type="email" |
| 47 | + pInputText |
| 48 | + formControlName="email" |
| 49 | + placeholder="email@example.com" |
| 50 | + autocomplete="off" |
| 51 | + /> |
| 52 | + </div> |
| 53 | + |
| 54 | + <div class="field"> |
| 55 | + <label for="password">Password</label> |
| 56 | + <p-password |
| 57 | + id="password" |
| 58 | + formControlName="password" |
| 59 | + [toggleMask]="true" |
| 60 | + [feedback]="false" |
| 61 | + autocomplete="new-password" |
| 62 | + ></p-password> |
| 63 | + @if ( |
| 64 | + signUpForm.controls["password"].errors && |
| 65 | + signUpForm.get("password")?.touched |
| 66 | + ) { |
| 67 | + <small class="text-danger"> |
| 68 | + Your password needs to be at least 8 characters long, include both |
| 69 | + lower- and upper-case characters, and have at least one number or |
| 70 | + special character |
| 71 | + </small> |
| 72 | + } |
| 73 | + </div> |
| 74 | + |
| 75 | + <div class="field"> |
| 76 | + <label for="confirmPassword">Confirm Password</label> |
| 77 | + <p-password |
| 78 | + id="confirmPassword" |
| 79 | + formControlName="confirmPassword" |
| 80 | + [toggleMask]="true" |
| 81 | + [feedback]="false" |
| 82 | + autocomplete="new-password" |
| 83 | + ></p-password> |
| 84 | + @if ( |
| 85 | + signUpForm.get("confirmPassword")?.errors?.["passwordMismatch"] && |
| 86 | + signUpForm.get("confirmPassword")?.touched |
| 87 | + ) { |
| 88 | + <small class="text-danger">Passwords must match</small> |
| 89 | + } |
| 90 | + </div> |
| 91 | + |
| 92 | + <div class="field-checkbox"> |
| 93 | + <p-checkbox |
| 94 | + formControlName="agreeToTerms" |
| 95 | + [binary]="true" |
| 96 | + id="agreeToTerms" |
| 97 | + ></p-checkbox> |
| 98 | + <label for="agreeToTerms"> |
| 99 | + I agree to the |
| 100 | + <a routerLink="/terms-of-use">Terms of Use</a> and |
| 101 | + <a routerLink="/privacy-policy">Privacy Policy</a> |
| 102 | + </label> |
| 103 | + </div> |
| 104 | + </div> |
| 105 | + |
| 106 | + <p-button |
| 107 | + class="btn-full-width" |
| 108 | + type="submit" |
| 109 | + label="Sign Up" |
| 110 | + [disabled]="!signUpForm.valid" |
| 111 | + ></p-button> |
| 112 | + </form> |
5 | 113 | </section>
|
0 commit comments