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