Skip to content

Commit 3766cde

Browse files
committed
Add ability to specify if a talk should be recorded
1 parent a2a1bee commit 3766cde

File tree

7 files changed

+48
-10
lines changed

7 files changed

+48
-10
lines changed

backend/api/submissions/mutations.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,16 +412,16 @@ def send_submission(
412412
if not conference.is_cfp_open:
413413
errors.add_error("non_field_errors", "The call for paper is not open!")
414414

415-
if (
416-
SubmissionModel.objects.of_user(request.user)
417-
.for_conference(conference)
418-
.non_cancelled()
419-
.count()
420-
>= 3
421-
):
422-
errors.add_error(
423-
"non_field_errors", "You can only submit up to 3 proposals"
424-
)
415+
# if (
416+
# SubmissionModel.objects.of_user(request.user)
417+
# .for_conference(conference)
418+
# .non_cancelled()
419+
# .count()
420+
# >= 3
421+
# ):
422+
# errors.add_error(
423+
# "non_field_errors", "You can only submit up to 3 proposals"
424+
# )
425425

426426
if errors.has_errors:
427427
return errors

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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,25 @@ export const ProposalSection = ({
232232
placeholder={inputPlaceholder}
233233
/>
234234
</InputWrapper>
235+
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>
235254
</Grid>
236255
</CardPart>
237256
</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 proposal to be recorded, please check this box. Note: Your talk will still be live streamed.",
583+
"cfp.doNotRecordCheckboxLabel":
584+
"I confirm I don't want my talk recorded and that it will not be uploaded to Python Italia's YouTube channel.",
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 che non desidero che il mio talk venga registrato né pubblicato sul canale YouTube di Python Italia.",
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)