Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit 8db6c2f

Browse files
committed
Add a required checkbox to the CfP proposal submission page. The checkbox content is not stored in the database, but submission will fail unless checked.
1 parent b455942 commit 8db6c2f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

conference/forms/forms.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
from p3 import utils as p3utils
1515
from conference import models
1616

17+
18+
REL_AGR_URL = 'https://epstage.europython.eu/events/speaker-release-agreement/'
19+
RELEASE_AGREEMENT_CHECKBOX = (
20+
"I agree with the terms outlined in the " +
21+
f"<a href='{REL_AGR_URL}' target='_blank'>" +
22+
"EuroPython Speaker Release Agreement</a>"
23+
)
24+
1725
log = logging.getLogger('conference.tags')
1826

1927
### Helpers
@@ -149,6 +157,10 @@ class TalkBaseForm(forms.Form):
149157
help_text=_('<p>Please add anything you may find useful for the review of your session proposal, e.g. references of where you have held talks, blogs, YouTube channels, books you have written, etc. This information will only be shown for talk review purposes.</p>'),
150158
widget=forms.Textarea,
151159
required=False)
160+
i_accept_speaker_release = forms.BooleanField(
161+
label=RELEASE_AGREEMENT_CHECKBOX,
162+
required=True
163+
)
152164

153165

154166
class TrackForm(forms.ModelForm):

conference/forms/talks.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from taggit_labels.widgets import LabelWidget
66

77
from conference.forms import TalkBaseForm
8-
from conference.models import (Conference, ConferenceTag, Talk, TALK_TYPE,
8+
from conference.models import (Conference, ConferenceTag, Talk, TALK_TYPE,
99
CFP_TALK_TYPE)
1010

1111

@@ -20,6 +20,9 @@ class TalkUpdateForm(forms.ModelForm):
2020
prerequisites = TalkBaseForm.base_fields["prerequisites"]
2121
level = TalkBaseForm.base_fields["level"]
2222
domain_level = TalkBaseForm.base_fields["domain_level"]
23+
i_accept_speaker_release = TalkBaseForm.base_fields[
24+
'i_accept_speaker_release'
25+
]
2326

2427
class Meta:
2528
model = Talk

0 commit comments

Comments
 (0)