Skip to content
Snippets Groups Projects
Commit a6a69c6b authored by Tom Teichler's avatar Tom Teichler :beers:
Browse files

Validate SEPA

parent 2afeeca6
No related branches found
No related tags found
1 merge request!1Reformat and cleanup
Pipeline #56097 canceled
......@@ -248,7 +248,7 @@ class RegisterEventContactDetails(ExtensibleForm):
email = forms.EmailField(
label=_("Email address"),
help_text=_("Please use your perosnal e-mail address here, which you will check "
help_text=_("Please use your personal e-mail address here, which you will check "
"personally. Important information will always be sent to your parents "
"as well. Do not use an e-mail address owned by your parents here."),
)
......@@ -322,6 +322,11 @@ class RegisterEventFinancial(ExtensibleForm):
required=False,
)
def clean(self):
if self.cleaned_data["accept_sepa"]:
if not self.cleaned_data["iban"]:
raise forms.ValidationError(_("Please enter your IBAN"))
class Meta:
model = EventRegistration
fields = ["voucher_code", "iban", "donation", "accept_sepa"]
......
......@@ -54,7 +54,11 @@
</div>
</div>
<div class="card-action">
<a href="{% url "register_event_by_slug_start" event.linked_group.short_name %}">{% trans "Register now" %}</a>
{% if can_register %}
<a href="{% url "register_event_by_slug_start" event.linked_group.short_name %}">{% trans "Register now" %}</a>
{% else %}
<a href="#">{% trans "Not available" %}</a>
{% endif %}
</div>
</div>
......
......@@ -379,9 +379,6 @@ class RegisterEventWizardView(SessionWizardView):
{
"first_name": person.first_name,
"last_name": person.last_name,
"school": person.school,
"school_place": person.school_place,
"school_class": person.school_class,
"mobile_number": person.mobile_number,
"email": person.email,
"street": person.street,
......
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