Skip to content

Commit

Permalink
Add 3rd checkbox to Terms and Conditions (#1012)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Added Jamie's changes for MLH checkbox, fixed merge conflicts.

* fixed dumb rebase error

---------

Co-authored-by: Tavi Pollard <[email protected]>
Co-authored-by: allennatang <[email protected]>
Co-authored-by: Tavi Pollard <[email protected]>
  • Loading branch information
4 people committed Nov 15, 2024
1 parent d3f2e10 commit 3a5af4e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)';
Expand Down
1 change: 1 addition & 0 deletions src/config/userTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export interface IHacker {
// no enum for these
country: string;
ethnicity: string[];
sendEmail: boolean;
privacyPolicy: boolean;
codeOfConduct: boolean;
};
Expand Down
13 changes: 13 additions & 0 deletions src/features/Application/ManageApplicationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const ManageApplicationForm: React.FunctionComponent<
},
other: {
ethnicity: [],
sendEmail: false,
country: '',
privacyPolicy: false,
codeOfConduct: false,
Expand Down Expand Up @@ -819,6 +820,18 @@ const ManageApplicationForm: React.FunctionComponent<
name="hacker.application.other.privacyPolicy"
/>
</div>
<FastField
name={'hacker.application.other.sendEmail'} // change
component={FormikElements.Checkbox}
label={CONSTANTS.SEND_EMAIL_LABEL} // change
value={fp.values.hacker.application.other.sendEmail} // change
/>
<div className="checkbox-error-message">
<ErrorMessage
component={FormikElements.Error}
name="hacker.application.other.sendEmail"
/>
</div>
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions src/features/Application/validationSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 3a5af4e

Please sign in to comment.