mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Add support for orders without email addresses
This commit is contained in:
@@ -522,6 +522,7 @@ class ConfirmStep(CartMixin, AsyncAction, TemplateFlowStep):
|
||||
for r, response in sorted(responses, key=lambda r: str(r[0])):
|
||||
for key, value in response.items():
|
||||
v = self.cart_session.get('contact_form_data', {}).get(key)
|
||||
v = value.bound_data(v, initial='')
|
||||
if v is True:
|
||||
v = _('Yes')
|
||||
elif v is False:
|
||||
|
||||
@@ -14,6 +14,7 @@ from pretix.base.forms.questions import (
|
||||
from pretix.base.models import ItemVariation
|
||||
from pretix.base.models.tax import TAXED_ZERO
|
||||
from pretix.base.templatetags.rich_text import rich_text
|
||||
from pretix.base.validators import EmailBlacklistValidator
|
||||
from pretix.presale.signals import contact_form_fields
|
||||
|
||||
|
||||
@@ -23,6 +24,7 @@ class ContactForm(forms.Form):
|
||||
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.'),
|
||||
validators=[EmailBlacklistValidator()],
|
||||
widget=forms.EmailInput(attrs={'autofocus': 'autofocus'}))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
@@ -120,10 +120,12 @@
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{% trans "E-mail address" %}</dt>
|
||||
<dd>{{ cart_session.email }}</dd>
|
||||
</dl>
|
||||
{% if "email" not in contact_info.keys %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{% trans "E-mail address" %}</dt>
|
||||
<dd>{{ cart_session.email }}</dd>
|
||||
</dl>
|
||||
{% endif %}
|
||||
{% for l, v in contact_info %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{{ l }}</dt>
|
||||
|
||||
Reference in New Issue
Block a user