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

Use payment choices from InvoiceGroup

parent b5bad59d
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@ from django_select2.forms import ModelSelect2MultipleWidget, ModelSelect2Widget
from material import Fieldset, Layout, Row
from phonenumber_field.formfields import PhoneNumberField
from aleksis.apps.tezor.models.invoice import Invoice
from aleksis.apps.tezor.models.invoice import InvoiceGroup
from aleksis.core.mixins import ExtensibleForm
from aleksis.core.models import Group, Person
......@@ -339,7 +339,6 @@ class RegisterEventFinancial(ExtensibleForm):
)
payment_method = forms.ChoiceField(
choices=Invoice.get_variant_choices(),
label=_("Payment method"),
help_text=_(
"Please choose a payment method. "
......@@ -347,6 +346,12 @@ class RegisterEventFinancial(ExtensibleForm):
),
)
def __init__(self, *args, **kwargs):
super().__init__(self, *args, **kwargs)
self.fields["payment_method"].choices = InvoiceGroup.objects.get(name="Hack'n'Fun-Veranstaltungen").get_variant_choices()
class Meta:
model = EventRegistration
fields = ["voucher_code", "donation"]
......
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