Skip to content

Commit 07f2180

Browse files
committed
added in MLH compliance questions to post acceptance form
1 parent cbb390f commit 07f2180

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

common/questions.tsx

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,92 @@ export const PostAcceptanceFormSections: Array<QuestionSection | QuestionDefinit
630630
true,
631631
'First Last'
632632
),
633+
makeShortText('email', 'Email', true, 'email@example.com'),
634+
makeShortText('phoneNumber', 'Phone Number', true, 'Phone Number'),
635+
makeShortText('age', 'Age', true, 'Enter your age'),
636+
makeDropdown(
637+
'school',
638+
'School',
639+
Object.values(School).sort((a, b) => {
640+
if (a === School['Northeastern University']) return -1;
641+
if (b === School['Northeastern University']) return 1;
642+
643+
if (a === School['Other']) return 1;
644+
if (b === School['Other']) return -1;
645+
return a.localeCompare(b);
646+
}),
647+
true,
648+
'School'
649+
),
650+
makeDropdown(
651+
'levelOfStudy',
652+
'Level of Study',
653+
Object.values(YearOfEducation),
654+
true,
655+
'Level of Study'
656+
),
657+
makeShortText('countryOfResidence', 'Country of Residence', true, 'Country of Residence'),
658+
makeSection(<>MLH Policies</>),
659+
makeCheckbox(
660+
'mlhCodeOfConduct',
661+
<p>
662+
I have read and agree to the{' '}
663+
<a
664+
href="https://github.com/MLH/mlh-policies/blob/main/code-of-conduct.md"
665+
target="_blank"
666+
rel="noopener noreferrer"
667+
style={{ color: '#1890ff', textDecoration: 'underline' }}
668+
>
669+
MLH Code of Conduct
670+
</a>
671+
</p>,
672+
[YesOrNo.Yes],
673+
true,
674+
1
675+
),
676+
makeCheckbox(
677+
'mlhApplicationSharingAuthorization',
678+
<p>
679+
I authorize you to share my application/registration information with Major League Hacking for
680+
event administration, ranking, and MLH administration in-line with the{' '}
681+
<a
682+
href="https://github.com/MLH/mlh-policies/blob/main/privacy-policy.md"
683+
target="_blank"
684+
rel="noopener noreferrer"
685+
style={{ color: '#1890ff', textDecoration: 'underline' }}
686+
>
687+
MLH Privacy Policy
688+
</a>
689+
. I further agree to the terms of both the{' '}
690+
<a
691+
href="https://github.com/MLH/mlh-policies/blob/main/contest-terms.md"
692+
target="_blank"
693+
rel="noopener noreferrer"
694+
style={{ color: '#1890ff', textDecoration: 'underline' }}
695+
>
696+
MLH Contest Terms and Conditions
697+
</a>{' '}
698+
and the{' '}
699+
<a
700+
href="https://github.com/MLH/mlh-policies/blob/main/privacy-policy.md"
701+
target="_blank"
702+
rel="noopener noreferrer"
703+
style={{ color: '#1890ff', textDecoration: 'underline' }}
704+
>
705+
MLH Privacy Policy
706+
</a>
707+
</p>,
708+
[YesOrNo.Yes],
709+
true,
710+
1
711+
),
712+
makeCheckbox(
713+
'mlhMarketingAuthorization',
714+
'I authorize MLH to send me occasional emails about relevant events, career opportunities, and community announcements.',
715+
[YesOrNo.Yes],
716+
true,
717+
1
718+
),
633719
];
634720

635721
export const PostAcceptanceFormQuestions = PostAcceptanceFormSections.filter(filterQuestion);

common/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ export interface PostAcceptanceResponses extends SharedResponses {
4040
adultSignature?: string;
4141
minorSignature?: string;
4242
guardianSignature?: string;
43+
email?: string;
44+
phoneNumber?: string;
45+
age?: string;
46+
school?: School;
47+
levelOfStudy?: YearOfEducation;
48+
countryOfResidence?: string;
49+
mlhCodeOfConduct?: Array<string>;
50+
mlhApplicationSharingAuthorization?: Array<string>;
51+
mlhMarketingAuthorization?: Array<string>;
4352
hangingWithFriends?: HangingWithFriends;
4453
zombieApocalypse?: ZombieApocalypse;
4554
takeOverNation?: TakeOverNation;

components/questions/short-test-question/ShortTextQuestion.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ type ShortTextProps = {
99
};
1010

1111
const ShortTextQuestion: FC<ShortTextProps> = ({ question, form, disabled }) => {
12+
const isNumberInput = question.field === 'age';
1213
return (
1314
<Form.Item
1415
data-testid="shortText-question"
@@ -22,6 +23,7 @@ const ShortTextQuestion: FC<ShortTextProps> = ({ question, form, disabled }) =>
2223
data-testid="inputText3"
2324
disabled={disabled}
2425
placeholder={question.placeholder}
26+
type={isNumberInput ? 'number' : 'text'}
2527
onChange={(e) => form.setFieldsValue({ [question.id]: e.target.value as string })}
2628
/>
2729
</Form.Item>

0 commit comments

Comments
 (0)