diff --git a/src/pretix/base/settings.py b/src/pretix/base/settings.py index 2cb5533c2..ab1417abe 100644 --- a/src/pretix/base/settings.py +++ b/src/pretix/base/settings.py @@ -672,6 +672,13 @@ Your {event} team""")) 'default': '', 'type': LazyI18nString }, + 'checkout_email_helptext': { + 'default': LazyI18nString.from_gettext(ugettext_noop( + 'Make sure to enter a valid email address. We will send you an order ' + 'confirmation including a link that you need to access your order later.' + )), + 'type': LazyI18nString + }, 'organizer_info_text': { 'default': '', 'type': LazyI18nString diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index 5fd612284..1d94979e3 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -502,6 +502,12 @@ class EventSettingsForm(SettingsForm): required=False, widget=I18nTextarea ) + checkout_email_helptext = I18nFormField( + label=_("Help text of the email field"), + required=False, + widget_kwargs={'attrs': {'rows': '2'}}, + widget=I18nTextarea + ) presale_has_ended_text = I18nFormField( label=_("End of presale text"), required=False, diff --git a/src/pretix/control/templates/pretixcontrol/event/settings.html b/src/pretix/control/templates/pretixcontrol/event/settings.html index fd276569a..f5db49546 100644 --- a/src/pretix/control/templates/pretixcontrol/event/settings.html +++ b/src/pretix/control/templates/pretixcontrol/event/settings.html @@ -92,6 +92,7 @@ {% bootstrap_field sform.presale_has_ended_text layout="control" %} {% bootstrap_field sform.voucher_explanation_text layout="control" %} {% bootstrap_field sform.confirm_text layout="control" %} + {% bootstrap_field sform.checkout_email_helptext layout="control" %}
{% trans "Shop design" %} diff --git a/src/pretix/presale/forms/checkout.py b/src/pretix/presale/forms/checkout.py index 58fa8dc37..16542b74b 100644 --- a/src/pretix/presale/forms/checkout.py +++ b/src/pretix/presale/forms/checkout.py @@ -26,8 +26,6 @@ from pretix.presale.signals import contact_form_fields class ContactForm(forms.Form): required_css_class = 'required' 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 to access your order later.'), validators=[EmailBanlistValidator()], widget=forms.EmailInput(attrs={'autocomplete': 'section-contact email'}) ) @@ -49,6 +47,7 @@ class ContactForm(forms.Form): # is an autofocus field. Who would have thought… See e.g. here: # https://floatboxjs.com/forum/topic.php?post=8440&usebb_sid=2e116486a9ec6b7070e045aea8cded5b#post8440 self.fields['email'].widget.attrs['autofocus'] = 'autofocus' + self.fields['email'].help_text = self.event.settings.checkout_email_helptext responses = contact_form_fields.send(self.event, request=self.request) for r, response in responses: