|
1 | | -<ion-header translucent class="hide-lg hide-xl"> |
2 | | - <ion-toolbar fixed [color]="userThemeColorPrimary"> |
3 | | - <ion-buttons slot="start"> |
4 | | - <ion-menu-button autoHide="false"></ion-menu-button> |
5 | | - <ion-title>Quarantine Help</ion-title> |
6 | | - </ion-buttons> |
| 1 | +<ion-header class="ion-no-border"> |
| 2 | + <ion-toolbar> |
| 3 | + <ion-title> |
| 4 | + <ion-row class="ion-justify-content-start ion-align-items-center"> |
| 5 | + <ion-back-button mode="md" icon="chevron-back"></ion-back-button> |
| 6 | + <ion-text class="about"> |
| 7 | + <h1>Register</h1> |
| 8 | + </ion-text> |
| 9 | + </ion-row> |
| 10 | + </ion-title> |
7 | 11 | </ion-toolbar> |
| 12 | + <ion-row class="ion-justify-content-center ion-align-items-center ion-padding-top"> |
| 13 | + <h4> |
| 14 | + {{ userType === 'HL' ? 'Volunteer' : 'Quarantined'}} |
| 15 | + </h4> |
| 16 | + </ion-row> |
8 | 17 | </ion-header> |
9 | 18 |
|
10 | | -<ion-content class="ion-padding ion-margin"> |
11 | | - <ion-grid class="ion-padding top-spacer"> |
12 | | - <ion-segment [(ngModel)]="userType"> |
13 | | - <ion-segment-button value="AF"> |
14 | | - <ion-label>I'm Quarantined</ion-label> |
15 | | - </ion-segment-button> |
16 | | - <ion-segment-button value="HL"> |
17 | | - <ion-label>I Volunteer</ion-label> |
18 | | - </ion-segment-button> |
19 | | - </ion-segment> |
| 19 | +<ion-content class="ion-padding ion-margin ion-justify-content-center"> |
| 20 | + <ion-grid class="ion-padding top-spacer ion-justify-content-center"> |
| 21 | + |
| 22 | + <!-- <ion-label>Quarantined</ion-label> --> |
| 23 | + |
20 | 24 |
|
21 | 25 | <form [formGroup]="regForm"> |
22 | 26 | <ion-row class="ion-justify-content-center"> |
23 | | - <ion-col size-md="2" size-lg="2"> |
| 27 | + <ion-col size-md="4" size-lg="4" size-xs="12"> |
24 | 28 | <ion-item> |
25 | | - <ion-label color="medium" position="floating">First Name</ion-label> |
26 | | - <ion-input required formControlName="firstName"></ion-input> |
| 29 | + <ion-label color="medium-text" position="floating">Full Name</ion-label> |
| 30 | + <ion-input required formControlName="fullName"></ion-input> |
27 | 31 | </ion-item> |
28 | 32 | <ion-item lines="none" class="formInvalid" |
29 | | - *ngIf="(regForm.get('firstName').invalid && (regForm.get('firstName').dirty || regForm.get('firstName').touched))"> |
30 | | - <div *ngIf="regForm.get('firstName').errors.required"> |
| 33 | + *ngIf="(regForm.get('fullName').invalid && (regForm.get('fullName').dirty || regForm.get('fullName').touched))"> |
| 34 | + <div *ngIf="regForm.get('fullName').errors.required"> |
31 | 35 | First Name is required. |
32 | 36 | </div> |
33 | 37 | </ion-item> |
34 | 38 | </ion-col> |
| 39 | + </ion-row> |
35 | 40 |
|
36 | | - <ion-col size-md="2" size-lg="2"> |
| 41 | + <ion-row class="ion-justify-content-center"> |
| 42 | + <ion-col size-md="4" size-lg="4" size-xs="12"> |
37 | 43 | <ion-item> |
38 | | - <ion-label color="medium" position="floating">Last Name</ion-label> |
39 | | - <ion-input required formControlName="lastName"></ion-input> |
| 44 | + <ion-label color="medium-text" position="floating">Email address </ion-label> |
| 45 | + <ion-input required formControlName="email" type="email"></ion-input> |
40 | 46 | </ion-item> |
41 | 47 | <ion-item lines="none" class="formInvalid" |
42 | | - *ngIf="(regForm.get('lastName').invalid && (regForm.get('lastName').dirty || regForm.get('lastName').touched))"> |
43 | | - <div *ngIf="regForm.get('lastName').errors.required"> |
44 | | - Last Name is required. |
| 48 | + *ngIf="(regForm.get('email').invalid && (regForm.get('email').dirty || regForm.get('email').touched))"> |
| 49 | + <div *ngIf="regForm.get('email').errors.required"> |
| 50 | + Email address is required. |
| 51 | + </div> |
| 52 | + <div *ngIf="regForm.get('email').errors.email"> |
| 53 | + Please enter a valid email. |
45 | 54 | </div> |
46 | 55 | </ion-item> |
47 | 56 | </ion-col> |
|
50 | 59 | <ion-row class="ion-justify-content-center"> |
51 | 60 | <ion-col size-md="4" size-lg="4" size-xs="12"> |
52 | 61 | <ion-item> |
53 | | - <ion-label color="medium" position="floating"> Address Line </ion-label> |
| 62 | + <ion-label color="medium-text" position="floating">Phone Number </ion-label> |
| 63 | + <ion-input required formControlName="phoneNumber" type="tel"></ion-input> |
| 64 | + </ion-item> |
| 65 | + <ion-item lines="none" class="formInvalid" |
| 66 | + *ngIf="(regForm.get('phoneNumber').invalid && (regForm.get('phoneNumber').dirty || regForm.get('phoneNumber').touched))"> |
| 67 | + <div *ngIf="regForm.get('phoneNumber').errors.required"> |
| 68 | + Phone Number is required. |
| 69 | + </div> |
| 70 | + <div *ngIf="regForm.get('phoneNumber').errors.minlength"> |
| 71 | + Please enter at least 8 digits. |
| 72 | + </div> |
| 73 | + <div *ngIf="regForm.get('phoneNumber').errors.maxlength"> |
| 74 | + Number exceeded maximum length. |
| 75 | + </div> |
| 76 | + </ion-item> |
| 77 | + </ion-col> |
| 78 | + </ion-row> |
| 79 | + |
| 80 | + <ion-row class="ion-justify-content-center"> |
| 81 | + <ion-col size-md="4" size-lg="4" size-xs="12"> |
| 82 | + <ion-item> |
| 83 | + <ion-label color="medium-text" position="floating">Password </ion-label> |
| 84 | + <ion-input [type]="passwordIcon === 'eye'? 'password':'text'" required formControlName="password" |
| 85 | + type="password"></ion-input> |
| 86 | + <ion-icon slot="end" [name]="passwordIcon" (click)="togglePasswordVisibility()" color="medium" |
| 87 | + class="ion-align-self-center"> |
| 88 | + </ion-icon> |
| 89 | + </ion-item> |
| 90 | + <ion-item lines="none" class="formInvalid" |
| 91 | + *ngIf="(regForm.get('password').invalid && (regForm.get('password').dirty || regForm.get('password').touched))"> |
| 92 | + <div *ngIf="regForm.get('password').errors.required"> |
| 93 | + Password is required. |
| 94 | + </div> |
| 95 | + <div *ngIf="regForm.get('password').errors.minlength"> |
| 96 | + Please enter minimum 8 characters. |
| 97 | + </div> |
| 98 | + </ion-item> |
| 99 | + </ion-col> |
| 100 | + </ion-row> |
| 101 | + |
| 102 | + <ion-row class="ion-justify-content-center"> |
| 103 | + <ion-col size-md="4" size-lg="4" size-xs="12"> |
| 104 | + <ion-item> |
| 105 | + <ion-label color="medium-text" position="floating"> Address Line </ion-label> |
54 | 106 | <ion-input required formControlName="address"></ion-input> |
55 | 107 | </ion-item> |
56 | 108 | <ion-list *ngIf="displayAddressSearchResult && addressResultList.length > 0" lines="none" |
|
73 | 125 | <ion-row class="ion-justify-content-center"> |
74 | 126 | <ion-col size-md="4" size-lg="4" size-xs="12"> |
75 | 127 | <ion-item> |
76 | | - <ion-label color="medium" position="floating"> Post Code </ion-label> |
| 128 | + <ion-label color="medium-text" position="floating"> Post Code </ion-label> |
77 | 129 | <ion-input required formControlName="postCode"></ion-input> |
78 | 130 | </ion-item> |
79 | 131 | <ion-item lines="none" class="formInvalid" |
|
88 | 140 | <ion-row class="ion-justify-content-center"> |
89 | 141 | <ion-col size-md="4" size-lg="4" size-xs="12"> |
90 | 142 | <ion-item> |
91 | | - <ion-label color="medium" position="floating"> City </ion-label> |
| 143 | + <ion-label color="medium-text" position="floating"> City </ion-label> |
92 | 144 | <ion-input required formControlName="city"></ion-input> |
93 | 145 | </ion-item> |
94 | 146 | <ion-item lines="none" class="formInvalid" |
|
106 | 158 | <ion-row class="ion-justify-content-center"> |
107 | 159 | <ion-col size-md="4" size-lg="4" size-xs="12"> |
108 | 160 | <ion-item (click)="showCountrySearch()"> |
109 | | - <ion-label color="medium" position="floating"> Country </ion-label> |
| 161 | + <ion-label color="medium-text" position="floating"> Country </ion-label> |
110 | 162 | <ion-input readonly="true" required formControlName="country"></ion-input> |
111 | 163 | </ion-item> |
112 | 164 | <ion-item *ngIf="displayCountrySearchResult" lines="none"> |
|
132 | 184 | </ion-col> |
133 | 185 | </ion-row> |
134 | 186 |
|
135 | | - <ion-row class="ion-justify-content-center"> |
136 | | - <ion-col size-md="4" size-lg="4" size-xs="12"> |
137 | | - <ion-item> |
138 | | - <ion-label color="medium" position="floating">Email address </ion-label> |
139 | | - <ion-input required formControlName="email" type="email"></ion-input> |
140 | | - </ion-item> |
141 | | - <ion-item lines="none" class="formInvalid" |
142 | | - *ngIf="(regForm.get('email').invalid && (regForm.get('email').dirty || regForm.get('email').touched))"> |
143 | | - <div *ngIf="regForm.get('email').errors.required"> |
144 | | - Email address is required. |
145 | | - </div> |
146 | | - <div *ngIf="regForm.get('email').errors.email"> |
147 | | - Please enter a valid email. |
148 | | - </div> |
149 | | - </ion-item> |
150 | | - </ion-col> |
151 | | - </ion-row> |
152 | | - |
153 | | - <ion-row class="ion-justify-content-center"> |
154 | | - <ion-col size-md="4" size-lg="4" size-xs="12"> |
155 | | - <ion-item> |
156 | | - <ion-label color="medium" position="floating">Phone Number </ion-label> |
157 | | - <ion-input required formControlName="phoneNumber" type="tel"></ion-input> |
158 | | - </ion-item> |
159 | | - <ion-item lines="none" class="formInvalid" |
160 | | - *ngIf="(regForm.get('phoneNumber').invalid && (regForm.get('phoneNumber').dirty || regForm.get('phoneNumber').touched))"> |
161 | | - <div *ngIf="regForm.get('phoneNumber').errors.required"> |
162 | | - Phone Number is required. |
163 | | - </div> |
164 | | - <div *ngIf="regForm.get('phoneNumber').errors.minlength"> |
165 | | - Please enter at least 8 digits. |
166 | | - </div> |
167 | | - <div *ngIf="regForm.get('phoneNumber').errors.maxlength"> |
168 | | - Number exceeded maximum length. |
169 | | - </div> |
170 | | - </ion-item> |
171 | | - </ion-col> |
172 | | - </ion-row> |
173 | | - |
174 | | - <ion-row class="ion-justify-content-center"> |
175 | | - <ion-col size-md="4" size-lg="4" size-xs="12"> |
176 | | - <ion-item> |
177 | | - <ion-label color="medium" position="floating">Password </ion-label> |
178 | | - <ion-input [type]="passwordIcon === 'eye'? 'password':'text'" required formControlName="password" |
179 | | - type="password"></ion-input> |
180 | | - <ion-icon slot="end" [name]="passwordIcon" (click)="togglePasswordVisibility()" color="medium" |
181 | | - class="ion-align-self-center"> |
182 | | - </ion-icon> |
183 | | - </ion-item> |
184 | | - <ion-item lines="none" class="formInvalid" |
185 | | - *ngIf="(regForm.get('password').invalid && (regForm.get('password').dirty || regForm.get('password').touched))"> |
186 | | - <div *ngIf="regForm.get('password').errors.required"> |
187 | | - Password is required. |
188 | | - </div> |
189 | | - <div *ngIf="regForm.get('password').errors.minlength"> |
190 | | - Please enter minimum 8 characters. |
191 | | - </div> |
192 | | - </ion-item> |
193 | | - </ion-col> |
194 | | - </ion-row> |
195 | | - |
196 | | - <ion-row class="ion-justify-content-center ion-padding-vertical"> |
197 | | - <ion-col size-md="4" size-lg="3" size-xs="8"> |
198 | | - <ion-button [color]="userThemeColorPrimary" shape="round" expand="full" size="default" fill="outline" |
199 | | - [disabled]="(regFormClean || !regForm.valid)" (click)="registerUser()"> |
200 | | - Register |
201 | | - </ion-button> |
202 | | - </ion-col> |
203 | | - </ion-row> |
204 | 187 | </form> |
205 | 188 | </ion-grid> |
206 | 189 | </ion-content> |
| 190 | + |
| 191 | +<ion-footer class="ion-no-border"> |
| 192 | + <ion-row class="ion-justify-content-center ion-padding-top "> |
| 193 | + <ion-col size-md="4" size-lg="3" size-xs="8"> |
| 194 | + <ion-button [color]="userThemeColorPrimary" shape="round" expand="full" size="default" fill="solid" |
| 195 | + [disabled]="(regFormClean || !regForm.valid)" (click)="registerUser()" class="submit-button"> |
| 196 | + Register |
| 197 | + </ion-button> |
| 198 | + </ion-col> |
| 199 | + </ion-row> |
| 200 | + |
| 201 | + <ion-row class="ion-justify-content-center ion-padding-bottom"> |
| 202 | + <p>Already have an account? <a routerLink="/login"> Log in</a></p> |
| 203 | + </ion-row> |
| 204 | +</ion-footer> |
0 commit comments