Allow configurable addition to the order confirmation message

This commit is contained in:
Raphael Michel
2021-03-01 18:28:08 +01:00
parent 2221b57dc9
commit 8af91b691d
5 changed files with 20 additions and 0 deletions

View File

@@ -596,6 +596,7 @@ class EventSettingsSerializer(SettingsSerializer):
'checkout_email_helptext',
'presale_has_ended_text',
'voucher_explanation_text',
'checkout_success_text',
'banner_text',
'banner_text_bottom',
'show_dates_on_frontpage',

View File

@@ -1997,6 +1997,19 @@ Your {event} team"""))
"why you need information from them.")
)
},
'checkout_success_text': {
'default': '',
'type': LazyI18nString,
'serializer_class': I18nField,
'form_class': I18nFormField,
'form_kwargs': dict(
label=_("Additional success message"),
help_text=_("This message will be shown after an order has been created successfully. It will be shown in additional "
"to the default text."),
widget_kwargs={'attrs': {'rows': '2'}},
widget=I18nTextarea
)
},
'checkout_phone_helptext': {
'default': '',
'type': LazyI18nString,

View File

@@ -435,6 +435,7 @@ class EventSettingsForm(SettingsForm):
'checkout_email_helptext',
'presale_has_ended_text',
'voucher_explanation_text',
'checkout_success_text',
'show_dates_on_frontpage',
'show_date_to',
'show_times',

View File

@@ -188,6 +188,7 @@
</div>
</div>
{% bootstrap_field sform.checkout_success_text layout="control" %}
{% bootstrap_field sform.checkout_email_helptext layout="control" %}
{% bootstrap_field sform.checkout_phone_helptext layout="control" %}
{% bootstrap_field sform.banner_text layout="control" %}

View File

@@ -6,6 +6,7 @@
{% load expiresformat %}
{% load eventurl %}
{% load phone_format %}
{% load rich_text %}
{% block title %}
{% if "thanks" in request.GET or "paid" in request.GET %}
{% trans "Thank you!" %}
@@ -44,6 +45,9 @@
{% else %}
<p>{% trans "We successfully received your payment. See below for details." %}</p>
{% endif %}
{% if request.event.settings.checkout_success_text %}
{{ request.event.settings.checkout_success_text|rich_text }}
{% endif %}
<p class="iframe-hidden">{% blocktrans trimmed %}
Please bookmark or save the link to this exact page if you want to access your order later. We also sent you an email containing the link to the address you specified.
{% endblocktrans %}</p>