diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c41a565ea2d8b2ea04619180fde591c1ae498709..50d87cc848a0d1b73d502001530fe10384f7e1c5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -19,6 +19,7 @@ Fixed ~~~~~ * Typo in success_url of CreateEventView +* COnfirmation of retraction deadline was missing `1.0`_ ------ diff --git a/aleksis/apps/paweljong/forms.py b/aleksis/apps/paweljong/forms.py index c7c1fe899e8da459713138c352ac301a3223c459..9ac8149b866014d31b77cf5cbf46e11d006f8d3c 100644 --- a/aleksis/apps/paweljong/forms.py +++ b/aleksis/apps/paweljong/forms.py @@ -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): diff --git a/aleksis/apps/paweljong/views.py b/aleksis/apps/paweljong/views.py index aac829539bf755588fbaef2162d8659851267110..13f0a78b9e74290308bff660b029671c445e1992 100644 --- a/aleksis/apps/paweljong/views.py +++ b/aleksis/apps/paweljong/views.py @@ -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)