@@ -4,65 +4,95 @@ block content
4
4
5
5
h1 Create New Account
6
6
7
- form( v-on:submit ="user.signup" v-bind:class ="{loading: user.signupForm.loading}" )
7
+ form( v-on:submit ="user.signup" v-bind:class ="{loading: user.signupForm.loading}" class = "signup-form" )
8
8
9
9
.toggle
10
- a( v-on:click ="user.signupForm.isTeacher = false" v-bind:class ="{active: !user.signupForm.isTeacher}" ) Student
11
- a( v-on:click ="user.signupForm.isTeacher = true" v-bind:class ="{active: user.signupForm.isTeacher}" ) Teacher
10
+ a( v-on:click ="user.signupForm.type = 'student'" v-bind:class ="{active: user.signupForm.type === 'student'}" ) Student
11
+ a( v-on:click ="user.signupForm.type = 'teacher'" v-bind:class ="{active: user.signupForm.type === 'teacher'}" ) Teacher
12
+ a( v-on:click ="user.signupForm.type = 'parent'" v-bind:class ="{active: user.signupForm.type === 'parent'}" ) Parent
12
13
13
14
.error ( v-show ="user.signupForm.error" style ="margin-top: .5em" ) {{user.signupForm.error}}
14
15
15
16
label
16
- | First Name
17
+ span( v-if ="user.signupForm.type !== 'parent'" ) First Name
18
+ span( v-if ="user.signupForm.type === 'parent'" ) Your child's first name
17
19
input( type ="text" required v-model ="user.signupForm.first" autocomplete ="given-name" )
18
20
19
21
label
20
- | Surname
22
+ span( v-if ="user.signupForm.type !== 'parent'" ) Surname
23
+ span( v-if ="user.signupForm.type === 'parent'" ) Your child's surname
21
24
input( type ="text" required v-model ="user.signupForm.last" autocomplete ="family-name" )
22
25
23
26
label
24
- | Email
27
+ span Email
28
+ br
29
+ div( class ="info" v-if ="user.signupForm.type === 'student'" ) (We sometimes find that our emails are blocked by school firewalls and therefore suggest that you do not use a school email address if possible.)
30
+ div( class ="info" v-if ="user.signupForm.type === 'parent'" ) (Used to log in)
25
31
input( type ="email" required v-model ="user.signupForm.email" autocomplete ="email" )
26
32
33
+ label( v-if ="user.signupForm.type !== 'teacher'" )
34
+ span( v-if ="user.signupForm.type === 'student'" ) Is your own email or a parent's email?
35
+ span( v-if ="user.signupForm.type === 'parent'" ) Is this your child's own email or a parent's email?
36
+ div( style ="text-align: center" )
37
+ input( type ='radio' v-model ="user.signupForm.primaryEmailType" value ='student' ) #is-student-email-student
38
+ label( class ="radio-label" for ="is-student-email-student" ) Child's
39
+ input( type ='radio' v-model ="user.signupForm.primaryEmailType" value ='parent' ) #is-student-email-parent
40
+ label( class ="radio-label" for ="is-student-email-parent" ) Parent's
41
+
42
+ //- label(v-if="user.signupForm.type !== 'teacher' && user.signupForm.primaryEmailType === 'student' && user.signupForm.birthYear < 2009")
43
+ //- span Parent's Email
44
+ //- br
45
+ //- div(class="info" v-if="user.signupForm.type === 'student'") (NEED STUDENT TEXT)
46
+ //- div(class="info" v-if="user.signupForm.type === 'parent'") (NEED PARENT TEXT)
47
+ //- input(type="email" required v-model="user.signupForm.guardianEmail" autocomplete="email")
48
+
27
49
label
28
- | Password (min 6 characters)
50
+ span Password
51
+ div( class ="info" ) (min 6 characters)
29
52
input( type ="password" required pattern =".{6,}" v-model ="user.signupForm.password" autocomplete ="password" )
30
53
31
- label( v-if ="!user.signupForm.isTeacher" )
32
- | Teacher code (if you are participating as part of a school)
54
+ label( v-if ="user.signupForm.type !== 'teacher'" )
55
+ span Teacher code
56
+ div( class ="info" ) (if you are participating as part of a school)
33
57
input( type ="text" v-model ="user.signupForm.teacherCode" )
34
58
35
- label( v-if ="!user.signupForm.isTeacher" )
36
- | Year
59
+ label( v-if ="user.signupForm.type !== 'teacher'" )
60
+ span( v-if ="user.signupForm.type === 'student'" ) Year
61
+ span( v-if ="user.signupForm.type === 'parent'" ) Your child's year group
37
62
select( v-model ="user.signupForm.level" )
38
63
option( value ="year7" ) Year 7 (age 12 or below)
39
64
option( value ="year8" ) Year 8 (age 12–13)
40
65
option( value ="year9" ) Year 9 (age 13–14)
41
66
option( value ="year10" ) Year 10 (age 14–15)
42
67
option( value ="year11" ) Year 11 (age 15 or above)
43
68
44
- label( v-if ="!user.signupForm.isTeacher && !user.signupForm.teacherCode" )
45
- | Year of Birth
69
+ label( v-if ="user.signupForm.type !== 'teacher' && !user.signupForm.teacherCode" )
70
+ span( v-if ="user.signupForm.type === 'student'" ) Year of Birth
71
+ span( v-if ="user.signupForm.type === 'parent'" ) Your child's year of birth
46
72
select( v-model ="user.signupForm.birthYear" )
47
73
- var year = 1920 ;
48
74
while year < 2016
49
75
option= year++
50
76
51
- label( v-if ="user.signupForm.isTeacher " )
52
- | School Name
77
+ label( v-if ="user.signupForm.type === 'teacher' " )
78
+ span School Name
53
79
input( type ="text" v-model ="user.signupForm.schoolName" required )
54
80
55
- label( v-if ="user.signupForm.isTeacher " )
56
- | School Post Code
81
+ label( v-if ="user.signupForm.type === 'teacher' " )
82
+ span School Post Code
57
83
input( type ="text" v-model ="user.signupForm.postCode" required )
58
84
59
- label( v-if ="user.signupForm.isTeacher " )
60
- | School Phone Number
85
+ label( v-if ="user.signupForm.type === 'teacher' " )
86
+ span School Phone Number
61
87
input( type ="text" v-model ="user.signupForm.phoneNumber" required )
62
88
63
89
//- TODO Calculate the age dynamically
64
- label( v-if ="!user.signupForm.isTeacher && !user.signupForm.teacherCode && user.signupForm.birthYear >= 2009" )
65
- | Email of a parent or guardian#[ br]#[ em This is required because you are not yet 13 years old.]
90
+ label( v-if ="user.signupForm.type !== 'teacher' && !user.signupForm.teacherCode && user.signupForm.birthYear >= 2009 && user.signupForm.primaryEmailType !== 'parent'" )
91
+ span Email of a parent or guardian
92
+ div( class ="info" v-if ="user.signupForm.type === 'student'" ) This is required because you are not yet 13 years old.
93
+ div( class ="info" v-if ="user.signupForm.type === 'parent'" ) This is required because your child is not yet 13 years old.
94
+
95
+
66
96
input( type ="email" v-model ="user.signupForm.guardianEmail" required )
67
97
68
98
p.checkbox
0 commit comments