From bbd4712b6d5a544bb5141ad3cf3d79d7acba2e25 Mon Sep 17 00:00:00 2001 From: Jamie Xiao <141690843+JamieXiao@users.noreply.github.com> Date: Thu, 14 Nov 2024 21:54:29 -0500 Subject: [PATCH] Add 3rd checkbox to Terms and Conditions (#1012) * Add 3rd checkbox to Terms and Conditions #1010 * MLH Form Changes (#1016) * Updated level of study options to match MLH requirements * #1000 - Update export from .tsv to .csv * Changed hacker account form 'birthdate' field to 'age' #1003 * Added country of residence field to Other/Personal Details section of hacker application #1009 * Added country of residence field to the hacker application. * add back CEGEP level of study. --------- Co-authored-by: allennatang * Added Jamie's changes for MLH checkbox, fixed merge conflicts. * fixed dumb rebase error --------- Co-authored-by: Tavi Pollard <45189395+tektaxi@users.noreply.github.com> Co-authored-by: allennatang Co-authored-by: Tavi Pollard --- src/config/constants.ts | 1 + src/config/userTypes.ts | 1 + src/features/Application/ManageApplicationForm.tsx | 13 +++++++++++++ src/features/Application/validationSchema.ts | 1 + 4 files changed, 16 insertions(+) diff --git a/src/config/constants.ts b/src/config/constants.ts index 9f2019b1..945fd4b0 100644 --- a/src/config/constants.ts +++ b/src/config/constants.ts @@ -132,6 +132,7 @@ export const OTHER_LINK_PLACEHOLDER = 'https://my.website.com/'; export const MCHACKS_COC = 'Code of Conduct'; export const MCHACKS_PRIVACY = 'Privacy Policy'; export const MLH_LABEL = 'I accept the MLH policies.'; +export const SEND_EMAIL_LABEL = 'I authorize MLH to send me occasional emails about relevant events, career opportunities, and community announcements.'; export const PERSONAL_LABEL = 'Personal URL'; export const RESUME_LABEL = 'Resume'; export const SHIRT_SIZE_LABEL = 'Shirt Size (Unisex)'; diff --git a/src/config/userTypes.ts b/src/config/userTypes.ts index e6b35a7c..5f48a9f0 100644 --- a/src/config/userTypes.ts +++ b/src/config/userTypes.ts @@ -64,6 +64,7 @@ export interface IHacker { // no enum for these country: string; ethnicity: string[]; + sendEmail: boolean; privacyPolicy: boolean; codeOfConduct: boolean; }; diff --git a/src/features/Application/ManageApplicationForm.tsx b/src/features/Application/ManageApplicationForm.tsx index cfde7a6a..8f5e524f 100644 --- a/src/features/Application/ManageApplicationForm.tsx +++ b/src/features/Application/ManageApplicationForm.tsx @@ -111,6 +111,7 @@ const ManageApplicationForm: React.FunctionComponent< }, other: { ethnicity: [], + sendEmail: false, country: '', privacyPolicy: false, codeOfConduct: false, @@ -819,6 +820,18 @@ const ManageApplicationForm: React.FunctionComponent< name="hacker.application.other.privacyPolicy" /> + +
+ +
diff --git a/src/features/Application/validationSchema.ts b/src/features/Application/validationSchema.ts index d462f887..ff2b4229 100644 --- a/src/features/Application/validationSchema.ts +++ b/src/features/Application/validationSchema.ts @@ -357,6 +357,7 @@ const getValidationSchema = (isCreate: boolean, pageNumber: number) => { }), other: object().shape({ ethnicity: array().required('Required'), + sendEmail: boolean(), country: string().required('Required'), privacyPolicy: boolean() .required('Required')