mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Add attendee email field (#466)
* Add attendee email field * exports, tests
This commit is contained in:
@@ -9,7 +9,10 @@ from pretix.base.models.orders import InvoiceAddress
|
||||
|
||||
|
||||
class ContactForm(forms.Form):
|
||||
email = forms.EmailField(label=_('E-mail'))
|
||||
email = forms.EmailField(label=_('E-mail'),
|
||||
help_text=_('Make sure to enter a valid email address. We will send you an order '
|
||||
'confirmation including a link that you need in case you want to make '
|
||||
'modifications to your order or download your ticket later.'))
|
||||
|
||||
|
||||
class InvoiceAddressForm(forms.ModelForm):
|
||||
@@ -67,6 +70,12 @@ class QuestionsForm(forms.Form):
|
||||
label=_('Attendee name'),
|
||||
initial=(cartpos.attendee_name if cartpos else orderpos.attendee_name)
|
||||
)
|
||||
if item.admission and event.settings.attendee_emails_asked:
|
||||
self.fields['attendee_email'] = forms.EmailField(
|
||||
required=event.settings.attendee_emails_required,
|
||||
label=_('Attendee email'),
|
||||
initial=(cartpos.attendee_email if cartpos else orderpos.attendee_email)
|
||||
)
|
||||
|
||||
for q in questions:
|
||||
# Do we already have an answer? Provide it as the initial value
|
||||
|
||||
Reference in New Issue
Block a user