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')