From 07f218058a209973282b5249cc5eca2e0d74fde8 Mon Sep 17 00:00:00 2001 From: vonbuelow Date: Mon, 12 Jan 2026 23:33:30 -0500 Subject: [PATCH] added in MLH compliance questions to post acceptance form --- common/questions.tsx | 86 +++++++++++++++++++ common/types.ts | 9 ++ .../short-test-question/ShortTextQuestion.tsx | 2 + 3 files changed, 97 insertions(+) diff --git a/common/questions.tsx b/common/questions.tsx index d78edab..add326e 100644 --- a/common/questions.tsx +++ b/common/questions.tsx @@ -630,6 +630,92 @@ export const PostAcceptanceFormSections: Array { + if (a === School['Northeastern University']) return -1; + if (b === School['Northeastern University']) return 1; + + if (a === School['Other']) return 1; + if (b === School['Other']) return -1; + return a.localeCompare(b); + }), + true, + 'School' + ), + makeDropdown( + 'levelOfStudy', + 'Level of Study', + Object.values(YearOfEducation), + true, + 'Level of Study' + ), + makeShortText('countryOfResidence', 'Country of Residence', true, 'Country of Residence'), + makeSection(<>MLH Policies), + makeCheckbox( + 'mlhCodeOfConduct', +

+ I have read and agree to the{' '} + + MLH Code of Conduct + +

, + [YesOrNo.Yes], + true, + 1 + ), + makeCheckbox( + 'mlhApplicationSharingAuthorization', +

+ I authorize you to share my application/registration information with Major League Hacking for + event administration, ranking, and MLH administration in-line with the{' '} + + MLH Privacy Policy + + . I further agree to the terms of both the{' '} + + MLH Contest Terms and Conditions + {' '} + and the{' '} + + MLH Privacy Policy + +

, + [YesOrNo.Yes], + true, + 1 + ), + makeCheckbox( + 'mlhMarketingAuthorization', + 'I authorize MLH to send me occasional emails about relevant events, career opportunities, and community announcements.', + [YesOrNo.Yes], + true, + 1 + ), ]; export const PostAcceptanceFormQuestions = PostAcceptanceFormSections.filter(filterQuestion); diff --git a/common/types.ts b/common/types.ts index 5613501..c0b0b3f 100644 --- a/common/types.ts +++ b/common/types.ts @@ -40,6 +40,15 @@ export interface PostAcceptanceResponses extends SharedResponses { adultSignature?: string; minorSignature?: string; guardianSignature?: string; + email?: string; + phoneNumber?: string; + age?: string; + school?: School; + levelOfStudy?: YearOfEducation; + countryOfResidence?: string; + mlhCodeOfConduct?: Array; + mlhApplicationSharingAuthorization?: Array; + mlhMarketingAuthorization?: Array; hangingWithFriends?: HangingWithFriends; zombieApocalypse?: ZombieApocalypse; takeOverNation?: TakeOverNation; diff --git a/components/questions/short-test-question/ShortTextQuestion.tsx b/components/questions/short-test-question/ShortTextQuestion.tsx index 50fc87c..99a9875 100644 --- a/components/questions/short-test-question/ShortTextQuestion.tsx +++ b/components/questions/short-test-question/ShortTextQuestion.tsx @@ -9,6 +9,7 @@ type ShortTextProps = { }; const ShortTextQuestion: FC = ({ question, form, disabled }) => { + const isNumberInput = question.field === 'age'; return ( = ({ question, form, disabled }) => data-testid="inputText3" disabled={disabled} placeholder={question.placeholder} + type={isNumberInput ? 'number' : 'text'} onChange={(e) => form.setFieldsValue({ [question.id]: e.target.value as string })} />