Skip to content

Commit 7c8529c

Browse files
authored
Add ability to specify if a talk should be recorded (#4510)
1 parent 3124b37 commit 7c8529c

File tree

7 files changed

+45
-0
lines changed

7 files changed

+45
-0
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/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export type CfpFormFields = ParticipantFormFields & {
7272
acceptedPrivacyPolicy: boolean;
7373
speakerAvailabilities: { [time: number]: null | string };
7474
materials: any[];
75+
doNotRecord: boolean;
7576
};
7677

7778
export type SubmissionStructure = {
@@ -100,6 +101,7 @@ export type SubmissionStructure = {
100101
fileUrl: string;
101102
fileMimeType: string;
102103
}[];
104+
doNotRecord: boolean;
103105
};
104106

105107
type Props = {
@@ -208,6 +210,7 @@ export const CfpForm = ({
208210
acceptedPrivacyPolicy: formState.values.acceptedPrivacyPolicy,
209211
speakerAvailabilities: formState.values.speakerAvailabilities,
210212
materials: formState.values.materials,
213+
doNotRecord: formState.values.doNotRecord,
211214
});
212215
};
213216

@@ -268,6 +271,7 @@ export const CfpForm = ({
268271
name: material.name,
269272
})),
270273
);
274+
formState.setField("doNotRecord", submission!.doNotRecord);
271275
}
272276

273277
if (participantData.me.participant) {

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

Lines changed: 25 additions & 0 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>
@@ -232,6 +236,27 @@ export const ProposalSection = ({
232236
placeholder={inputPlaceholder}
233237
/>
234238
</InputWrapper>
239+
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+
)}
235260
</Grid>
236261
</CardPart>
237262
</MultiplePartsCard>

frontend/src/components/cfp-send-submission/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const CfpSendSubmission = () => {
7676
speakerFacebookUrl: input.participantFacebookUrl,
7777
speakerMastodonHandle: input.participantMastodonHandle,
7878
speakerAvailabilities: input.speakerAvailabilities,
79+
doNotRecord: input.doNotRecord,
7980
},
8081
language,
8182
},

frontend/src/locale/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,12 @@ Click the box to change. If left empty, we will assume you are available.`,
577577

578578
"tickets.productsList.tshirtTitle": "T-shirt",
579579

580+
"cfp.doNotRecordLabel": "Do not record",
581+
"cfp.doNotRecordDescription":
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.",
583+
"cfp.doNotRecordCheckboxLabel":
584+
"I confirm that I do not want my talk to be recorded. I understand that it will not be uploaded to Python Italia’s YouTube channel and that it will not be possible to recover it in the future.",
585+
580586
"tickets.checkout.answerCardAdmissionTitle": "{attendeeName}'s ticket",
581587
"tickets.checkout.openAnswerCard": "Attendee Info",
582588
"tickets.checkout.billing": "Billing",
@@ -2314,6 +2320,12 @@ Clicca sulla casella per cambiare. Se lasciato vuoto, presumeremo che tu sia dis
23142320
"cfp.materials.add": "Aggiungi",
23152321
"cfp.materials.remove": "X",
23162322
"fileInput.currentFile": "File attuale: {name}",
2323+
2324+
"cfp.doNotRecordLabel": "Non registrare",
2325+
"cfp.doNotRecordDescription":
2326+
"Di norma registriamo tutti i talk e li pubblichiamo successivamente sul nostro canale YouTube. Se non desideri che il tuo intervento venga registrato, seleziona questa opzione. Nota: il talk sarà comunque trasmesso in streaming.",
2327+
"cfp.doNotRecordCheckboxLabel":
2328+
"Confermo di non voler che il mio talk venga registrato. Comprendo che non verrà caricato sul canale YouTube di Python Italia e che non sarà possibile recuperarlo in futuro.",
23172329
},
23182330
};
23192331

frontend/src/pages/submission/[id]/edit/get-submission.graphql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ query GetSubmission($id: ID!, $language: String!) {
66
abstract(language: $language)
77
elevatorPitch(language: $language)
88
shortSocialSummary
9+
doNotRecord
910
multilingualTitle {
1011
it
1112
en

frontend/src/pages/submission/[id]/edit/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ export const EditSubmissionPage = () => {
7676
url: material.url,
7777
fileId: material.fileId,
7878
})),
79+
doNotRecord: input.doNotRecord,
7980
},
8081
language,
8182
},

0 commit comments

Comments
 (0)