diff --git a/src/pretix/api/serializers/event.py b/src/pretix/api/serializers/event.py index 5ac98d62b..d087de736 100644 --- a/src/pretix/api/serializers/event.py +++ b/src/pretix/api/serializers/event.py @@ -796,6 +796,8 @@ class EventSettingsSerializer(SettingsSerializer): 'cancel_allow_user_paid_refund_as_giftcard', 'cancel_allow_user_paid_require_approval', 'cancel_allow_user_paid_require_approval_fee_unknown', + 'cancel_terms_paid', + 'cancel_terms_unpaid', 'change_allow_user_variation', 'change_allow_user_addons', 'change_allow_user_until', diff --git a/src/pretix/base/settings.py b/src/pretix/base/settings.py index 069db06af..3c5cd9fdd 100644 --- a/src/pretix/base/settings.py +++ b/src/pretix/base/settings.py @@ -1936,6 +1936,32 @@ DEFAULTS = { label=_("Do not allow cancellations after"), ) }, + 'cancel_terms_paid': { + 'default': None, + 'type': LazyI18nString, + 'serializer_class': I18nField, + 'form_class': I18nFormField, + 'form_kwargs': dict( + label=_("Terms of cancellation"), + widget=I18nTextarea, + widget_kwargs={'attrs': {'rows': '2'}}, + help_text=_("This text will be shown when cancellation is allowed for a paid order. Leave empty if you " + "want pretix to automatically generate the terms of cancellation based on your settings.") + ) + }, + 'cancel_terms_unpaid': { + 'default': None, + 'type': LazyI18nString, + 'serializer_class': I18nField, + 'form_class': I18nFormField, + 'form_kwargs': dict( + label=_("Terms of cancellation"), + widget=I18nTextarea, + widget_kwargs={'attrs': {'rows': '2'}}, + help_text=_("This text will be shown when cancellation is allowed for an unpaid or free order. Leave empty " + "if you want pretix to automatically generate the terms of cancellation based on your settings.") + ) + }, 'contact_mail': { 'default': None, 'type': str, diff --git a/src/pretix/control/forms/event.py b/src/pretix/control/forms/event.py index c84aa1fec..c03e6bd67 100644 --- a/src/pretix/control/forms/event.py +++ b/src/pretix/control/forms/event.py @@ -730,6 +730,8 @@ class CancelSettingsForm(SettingsForm): 'cancel_allow_user_paid_refund_as_giftcard', 'cancel_allow_user_paid_require_approval', 'cancel_allow_user_paid_require_approval_fee_unknown', + 'cancel_terms_paid', + 'cancel_terms_unpaid', 'change_allow_user_variation', 'change_allow_user_price', 'change_allow_user_until', diff --git a/src/pretix/control/templates/pretixcontrol/event/cancel.html b/src/pretix/control/templates/pretixcontrol/event/cancel.html index e06e0f966..7a206c706 100644 --- a/src/pretix/control/templates/pretixcontrol/event/cancel.html +++ b/src/pretix/control/templates/pretixcontrol/event/cancel.html @@ -14,6 +14,7 @@ {% bootstrap_field form.cancel_allow_user_unpaid_keep layout="control" %} {% bootstrap_field form.cancel_allow_user_unpaid_keep_percentage layout="control" %} {% bootstrap_field form.cancel_allow_user_unpaid_keep_fees layout="control" %} + {% bootstrap_field form.cancel_terms_unpaid layout="control" %}