@@ -4,65 +4,95 @@ block content
44
55 h1 Create New Account
66
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" )
88
99 .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
1213
1314 .error ( v-show ="user.signupForm.error" style ="margin-top: .5em" ) {{user.signupForm.error}}
1415
1516 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
1719 input( type ="text" required v-model ="user.signupForm.first" autocomplete ="given-name" )
1820
1921 label
20- | Surname
22+ span( v-if ="user.signupForm.type !== 'parent'" ) Surname
23+ span( v-if ="user.signupForm.type === 'parent'" ) Your child's surname
2124 input( type ="text" required v-model ="user.signupForm.last" autocomplete ="family-name" )
2225
2326 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)
2531 input( type ="email" required v-model ="user.signupForm.email" autocomplete ="email" )
2632
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+
2749 label
28- | Password (min 6 characters)
50+ span Password
51+ div( class ="info" ) (min 6 characters)
2952 input( type ="password" required pattern =".{6,}" v-model ="user.signupForm.password" autocomplete ="password" )
3053
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)
3357 input( type ="text" v-model ="user.signupForm.teacherCode" )
3458
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
3762 select( v-model ="user.signupForm.level" )
3863 option( value ="year7" ) Year 7 (age 12 or below)
3964 option( value ="year8" ) Year 8 (age 12–13)
4065 option( value ="year9" ) Year 9 (age 13–14)
4166 option( value ="year10" ) Year 10 (age 14–15)
4267 option( value ="year11" ) Year 11 (age 15 or above)
4368
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
4672 select( v-model ="user.signupForm.birthYear" )
4773 - var year = 1920 ;
4874 while year < 2016
4975 option= year++
5076
51- label( v-if ="user.signupForm.isTeacher " )
52- | School Name
77+ label( v-if ="user.signupForm.type === 'teacher' " )
78+ span School Name
5379 input( type ="text" v-model ="user.signupForm.schoolName" required )
5480
55- label( v-if ="user.signupForm.isTeacher " )
56- | School Post Code
81+ label( v-if ="user.signupForm.type === 'teacher' " )
82+ span School Post Code
5783 input( type ="text" v-model ="user.signupForm.postCode" required )
5884
59- label( v-if ="user.signupForm.isTeacher " )
60- | School Phone Number
85+ label( v-if ="user.signupForm.type === 'teacher' " )
86+ span School Phone Number
6187 input( type ="text" v-model ="user.signupForm.phoneNumber" required )
6288
6389 //- 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+
6696 input( type ="email" v-model ="user.signupForm.guardianEmail" required )
6797
6898 p.checkbox
0 commit comments