mirror of
https://github.com/pretix/pretix.git
synced 2026-08-23 12:51:59 +00:00
Allow to add a custom text above the payment choice
This commit is contained in:
@@ -93,6 +93,10 @@ DEFAULTS = {
|
|||||||
'default': '30',
|
'default': '30',
|
||||||
'type': int
|
'type': int
|
||||||
},
|
},
|
||||||
|
'payment_explanation': {
|
||||||
|
'default': '',
|
||||||
|
'type': LazyI18nString
|
||||||
|
},
|
||||||
'payment_term_days': {
|
'payment_term_days': {
|
||||||
'default': '14',
|
'default': '14',
|
||||||
'type': int
|
'type': int
|
||||||
|
|||||||
@@ -517,6 +517,16 @@ class PaymentSettingsForm(SettingsForm):
|
|||||||
help_text=_("The tax rule that applies for additional fees you configured for single payment methods. This "
|
help_text=_("The tax rule that applies for additional fees you configured for single payment methods. This "
|
||||||
"will set the tax rate and reverse charge rules, other settings of the tax rule are ignored.")
|
"will set the tax rate and reverse charge rules, other settings of the tax rule are ignored.")
|
||||||
)
|
)
|
||||||
|
payment_explanation = I18nFormField(
|
||||||
|
widget=I18nTextarea,
|
||||||
|
widget_kwargs={'attrs': {
|
||||||
|
'rows': 3,
|
||||||
|
}},
|
||||||
|
required=False,
|
||||||
|
label=_("Guidance text"),
|
||||||
|
help_text=_("This text will be shown above the payment options. You can explain the choices to the user here, "
|
||||||
|
"if you want.")
|
||||||
|
)
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
cleaned_data = super().clean()
|
cleaned_data = super().clean()
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
{% bootstrap_field form.payment_term_expire_automatically layout="control" %}
|
{% bootstrap_field form.payment_term_expire_automatically layout="control" %}
|
||||||
{% bootstrap_field form.payment_term_accept_late layout="control" %}
|
{% bootstrap_field form.payment_term_accept_late layout="control" %}
|
||||||
{% bootstrap_field form.tax_rate_default layout="control" %}
|
{% bootstrap_field form.tax_rate_default layout="control" %}
|
||||||
|
{% bootstrap_field form.payment_explanation layout="control" %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="form-group submit-group">
|
<div class="form-group submit-group">
|
||||||
<button type="submit" class="btn btn-primary btn-save">
|
<button type="submit" class="btn btn-primary btn-save">
|
||||||
|
|||||||
@@ -2,8 +2,12 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load money %}
|
{% load money %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load rich_text %}
|
||||||
{% block inner %}
|
{% block inner %}
|
||||||
<p>{% trans "Please select how you want to pay." %}</p>
|
<p>{% trans "Please select how you want to pay." %}</p>
|
||||||
|
{% if event.settings.payment_explanation %}
|
||||||
|
{{ event.settings.payment_explanation|rich_text }}
|
||||||
|
{% endif %}
|
||||||
<form method="post">
|
<form method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="panel-group" id="payment_accordion">
|
<div class="panel-group" id="payment_accordion">
|
||||||
|
|||||||
Reference in New Issue
Block a user