Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion functions/utilities/privacy/privacyKeys.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
*
* YOU MUST update these values in parallel-squared repo as well as here:
* YOU MUST also update these values in
* parallel-squared repo
* static/scripts/user.js in this repo
*
*/

Expand Down
20 changes: 10 additions & 10 deletions functions/views/_layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,16 @@ html
else
article(class=(sidebarDisabled ? 'sidebarDisabled' : '')): block content

if user && !user.acceptedTerms && path !== '/privacy-notice'
#accept-terms.modal
.modal-background
.modal-body
h2 Privacy Updates
form(v-on:submit="user.acceptTerms")
p.checkbox
input#terms-modal(type="checkbox" required)
label(for="terms-modal") We will email you when a new Parallelogram challenge is released, when the next Parallel Circles session is scheduled, and when there are special competitions, prizes and opportunities. By checking this box you consent to receiving these emails, in accordance with our #[a(href="/privacy-notice" target="_blank") Data Privacy policy].
button(type="submit") Continue
//- if user && !user.acceptedTerms && path !== '/privacy-notice'
//- #accept-terms.modal
//- .modal-background
//- .modal-body
//- h2 Privacy Updates
//- form(v-on:submit="user.acceptTerms")
//- p.checkbox
//- input#terms-modal(type="checkbox" required)
//- label(for="terms-modal") We will email you when a new Parallelogram challenge is released, when the next Parallel Circles session is scheduled, and when there are special competitions, prizes and opportunities. By checking this box you consent to receiving these emails, in accordance with our #[a(href="/privacy-notice" target="_blank") Data Privacy policy].
//- button(type="submit") Continue

if user && !user.code && user.showWelcomeMsg
.modal(v-if="showWelcomeMsg")
Expand Down
8 changes: 5 additions & 3 deletions functions/views/signup.pug
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ block content
span {{user.signupForm.messages[user.signupForm.type].yearOfBirth}}
select(v-model="user.signupForm.birthYear")
- var year = 1920;
while year < 2019
while year < 2024
option= year++

label(v-if="user.signupForm.type === 'teacher'")
Expand All @@ -93,8 +93,10 @@ block content
div(class="info") {{user.signupForm.messages[user.signupForm.type].emailOfParentSubtext}}
input(type="email" v-model="user.signupForm.guardianEmail" required)

p.checkbox
p.checkbox(v-if="!user.isUnderThirteen(user.signupForm.birthYear, user.signupForm.birthMonth)")
input#terms(type="checkbox" required)
label(for="terms") We will email you when a new Parallelogram challenge is released, when the next Parallel Circles session is scheduled, and when there are special competitions, prizes and opportunities. By checking this box you consent to receiving these emails, in accordance with our #[a(href="/privacy-notice" target="_blank") Privacy Notice].
label(for="terms") We will email you with updates on Parallelograms, Parallel Circles and other offerings from Parallel. By checking this box you consent to receiving these emails, and also confirm that you have read and accept our #[a(href="/privacy-notice" target="_blank") Privacy Notice].

p(class="under13Terms" v-if="user.isUnderThirteen(user.signupForm.birthYear, user.signupForm.birthMonth)") As this student is under the age of 13, we require a parent or guardian to read and accept our Privacy Notice. We will be in touch via the parent/guardian email address you have provided above. The Privacy Notice will need to be accepted within 7 days and the student can continue to access the Parallel website in the meantime.

button(type="submit") Sign up
14 changes: 12 additions & 2 deletions static/scripts/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
// Parallel Login
// =============================================================================


const latestPrivacyVersion = 'privacy-sept-2025-001';
const acceptedKey = `${latestPrivacyVersion}-accepted`;
const acceptedByKey = `${latestPrivacyVersion}-acceptedBy`;

const ERRORS = {
'auth/invalid-email': 'This email address is invalid.',
Expand Down Expand Up @@ -129,7 +131,7 @@ export default function() {

const passwordForm = {loading: false, error: ''};
const signupForm = {error: null, loading: false, level: 'year6',
birthYear: 2000, type: location.hash === '#teacher' ? 'teacher' : 'student', primaryEmailType: null, messages: {}};
birthYear: 2010, type: location.hash === '#teacher' ? 'teacher' : 'student', primaryEmailType: null, messages: {}};

signupForm.messages.student = {
firstName: "Student first name",
Expand Down Expand Up @@ -487,6 +489,13 @@ export default function() {

let primaryEmailType = signupForm.type === 'teacher' ? 'teacher' : signupForm.primaryEmailType

const isUnder13 = signupForm.birthYear ? user.isUnderThirteen(signupForm.birthYear, signupForm.birthMonth) : false;

const privacyData = isUnder13 ? {} : {
[acceptedKey]: Date.now(),
[acceptedByKey]: 'student-signup'
}

const signupData = {
first: signupForm.first || null,
last: signupForm.last || null,
Expand All @@ -500,6 +509,7 @@ export default function() {
postCode: signupForm.postCode || null,
guardianEmail,
acceptedTerms: true,
...privacyData,
userReference: generateUserReference(),
primaryEmailType,
source: window.SIGNUP_SOURCE || null
Expand Down
4 changes: 4 additions & 0 deletions static/styles/forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@
.info {
display: inline-block;
}
.under13Terms {
font-size: 16px;
color: inherit;
}
.radio-label {
display: inline-block;
font-size: 16px;
Expand Down