Skip to content

Commit e1b111b

Browse files
committed
Support new flag
1 parent cef66d4 commit e1b111b

File tree

3 files changed

+26
-19
lines changed

3 files changed

+26
-19
lines changed

frontend/src/components/cfp-form/cfp-form.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ query CfpForm($conference: String!) {
2222
submissionTypes {
2323
id
2424
name
25+
isRecordable
2526
}
2627

2728
languages {

frontend/src/components/cfp-form/proposal-section.tsx

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export const ProposalSection = ({
2626
}) => {
2727
const inputPlaceholder = useTranslatedMessage("input.placeholder");
2828
const { radio, raw, select, textarea, checkbox } = formOptions;
29+
const selectedType = conferenceData!.conference.submissionTypes.find(
30+
(type) => type.id === formState.values.type,
31+
);
32+
const isRecordable = selectedType?.isRecordable;
2933

3034
return (
3135
<MultiplePartsCard>
@@ -233,24 +237,26 @@ export const ProposalSection = ({
233237
/>
234238
</InputWrapper>
235239

236-
<InputWrapper
237-
required={false}
238-
title={<FormattedMessage id="cfp.doNotRecordLabel" />}
239-
description={<FormattedMessage id="cfp.doNotRecordDescription" />}
240-
>
241-
<label>
242-
<HorizontalStack gap="small" alignItems="center">
243-
<Checkbox
244-
{...checkbox("doNotRecord")}
245-
required={false}
246-
errors={getErrors("validationDoNotRecord")}
247-
/>
248-
<Text size={2} weight="strong">
249-
<FormattedMessage id="cfp.doNotRecordCheckboxLabel" />
250-
</Text>
251-
</HorizontalStack>
252-
</label>
253-
</InputWrapper>
240+
{isRecordable && (
241+
<InputWrapper
242+
required={false}
243+
title={<FormattedMessage id="cfp.doNotRecordLabel" />}
244+
description={<FormattedMessage id="cfp.doNotRecordDescription" />}
245+
>
246+
<label>
247+
<HorizontalStack gap="small" alignItems="center">
248+
<Checkbox
249+
{...checkbox("doNotRecord")}
250+
required={false}
251+
errors={getErrors("validationDoNotRecord")}
252+
/>
253+
<Text size={2} weight="strong">
254+
<FormattedMessage id="cfp.doNotRecordCheckboxLabel" />
255+
</Text>
256+
</HorizontalStack>
257+
</label>
258+
</InputWrapper>
259+
)}
254260
</Grid>
255261
</CardPart>
256262
</MultiplePartsCard>

frontend/src/locale/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ Click the box to change. If left empty, we will assume you are available.`,
579579

580580
"cfp.doNotRecordLabel": "Do not record",
581581
"cfp.doNotRecordDescription":
582-
"By default we record all talks and later upload them to our YouTube channel. If you don't want your proposal to be recorded, please check this box. Note: Your talk will still be live streamed.",
582+
"By default we record all talks and later upload them to our YouTube channel. If you don't want your talk to be recorded, please check this box. Note: Your talk will still be live streamed.",
583583
"cfp.doNotRecordCheckboxLabel":
584584
"I confirm I don't want my talk recorded and that it will not be uploaded to Python Italia's YouTube channel.",
585585

0 commit comments

Comments
 (0)