TicketQuestionsForm -> TicketLevelQuestionsForm

This commit is contained in:
Mira Weller
2026-08-12 15:56:53 +02:00
parent dc662c973b
commit 85eba9e543
3 changed files with 8 additions and 7 deletions
+4 -3
View File
@@ -956,9 +956,10 @@ class OrderLevelQuestionsForm(BaseQuestionsForm):
:param event: The event this belongs to
"""
request = kwargs.pop('request', None)
checkoutsession = self.checkoutsession = kwargs.pop('checkoutsession', None)
order = self.order = kwargs.pop('order', None)
checkoutsession = kwargs.pop('checkoutsession', None)
order = kwargs.pop('order', None)
container = checkoutsession or order
assert container and not (checkoutsession and order) # exactly one should be set
event = kwargs.pop('event')
self.all_optional = kwargs.pop('all_optional', False)
@@ -979,7 +980,7 @@ class OrderLevelQuestionsForm(BaseQuestionsForm):
return d
class TicketQuestionsForm(BaseQuestionsForm):
class TicketLevelQuestionsForm(BaseQuestionsForm):
"""
This form class is responsible for asking ticket-related questions. This includes
the attendee name for admission tickets, if the corresponding setting is enabled,
+2 -2
View File
@@ -33,7 +33,7 @@ from django.utils.timezone import make_aware
from pretix.base.forms.questions import (
BaseInvoiceAddressForm, BaseInvoiceNameForm, OrderLevelQuestionsForm,
TicketQuestionsForm,
TicketLevelQuestionsForm,
)
from pretix.base.models import (
CartPosition, InvoiceAddress, OrderPosition, Question, QuestionAnswer,
@@ -46,7 +46,7 @@ from pretix.presale.signals import contact_form_fields_overrides
class BaseQuestionsViewMixin:
order_form_class = OrderLevelQuestionsForm
orderposition_form_class = TicketQuestionsForm
orderposition_form_class = TicketLevelQuestionsForm
all_optional = False
@cached_property
+2 -2
View File
@@ -41,7 +41,7 @@ from django.utils.translation import gettext_lazy as _
from phonenumber_field.formfields import PhoneNumberField
from pretix.base.forms.questions import (
BaseInvoiceAddressForm, TicketQuestionsForm,
BaseInvoiceAddressForm, TicketLevelQuestionsForm,
WrappedPhoneNumberPrefixWidget, guess_phone_prefix_from_request,
)
from pretix.base.templatetags.rich_text import rich_text
@@ -139,7 +139,7 @@ class InvoiceNameForm(InvoiceAddressForm):
del self.fields[f]
class CustomerAwareQuestionsForm(TicketQuestionsForm):
class CustomerAwareQuestionsForm(TicketLevelQuestionsForm):
"""
The base class is responsible for asking order-related questions. This includes
the attendee name for admission tickets, if the corresponding setting is enabled,