Skip to content
Snippets Groups Projects
Verified Commit b8802ffd authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Add confirmation of retraction deadline

Closes #9
parent 70c09132
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ Fixed
~~~~~
* Typo in success_url of CreateEventView
* COnfirmation of retraction deadline was missing
`1.0`_
------
......
......@@ -374,6 +374,17 @@ class RegisterEventConsent(ExtensibleForm):
node = Row(f"consent_{field.pk}")
self.add_node_to_layout(node)
if event.date_retraction:
field_instance = forms.BooleanField(
required=True,
label=_(
"I confirm that the retraction of the registration is not possible anymore after {}"
).format(event.date_retraction),
)
self.fields["retraction_deadline"] = field_instance
node = Row("retraction_deadline")
self.add_node_to_layout(node)
class EditEventRegistrationForm(forms.ModelForm):
......
......@@ -550,6 +550,8 @@ class RegisterEventWizardView(SessionWizardView):
] = cleaned_data_additional[field.title]
for field in cleaned_data_consent:
if not field.startswith("consent_"):
continue
pk = int(field.split("_")[1])
term = Terms.objects.get(id=pk)
registration.accepted_terms.add(term)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment