forked from CGM_Public/pretix_original
Bank transfer: Add optional text to pending payments
This commit is contained in:
@@ -122,7 +122,14 @@ class BankTransfer(BasePaymentProvider):
|
|||||||
('prefix', forms.CharField(
|
('prefix', forms.CharField(
|
||||||
label=_('Prefix for the payment reference'),
|
label=_('Prefix for the payment reference'),
|
||||||
required=False,
|
required=False,
|
||||||
))
|
)),
|
||||||
|
('pending_description', I18nFormField(
|
||||||
|
label=_('Additional text to show on pending orders'),
|
||||||
|
help_text=_('This text will be shown on the order confirmation page for pending orders in addition to'
|
||||||
|
'the standard text.'),
|
||||||
|
widget=I18nTextarea,
|
||||||
|
required=False,
|
||||||
|
)),
|
||||||
])
|
])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@@ -216,6 +223,7 @@ class BankTransfer(BasePaymentProvider):
|
|||||||
'order': payment.order,
|
'order': payment.order,
|
||||||
'amount': payment.amount,
|
'amount': payment.amount,
|
||||||
'settings': self.settings,
|
'settings': self.settings,
|
||||||
|
'pending_description': self.settings.get('pending_description', as_type=LazyI18nString),
|
||||||
'details': self.settings.get('bank_details', as_type=LazyI18nString),
|
'details': self.settings.get('bank_details', as_type=LazyI18nString),
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
|
|||||||
@@ -5,7 +5,11 @@
|
|||||||
{% load ibanformat %}
|
{% load ibanformat %}
|
||||||
{% load money %}
|
{% load money %}
|
||||||
{% load unidecode %}
|
{% load unidecode %}
|
||||||
|
{% load rich_text %}
|
||||||
|
|
||||||
|
{% if pending_description %}
|
||||||
|
{{ pending_description|rich_text }}
|
||||||
|
{% endif %}
|
||||||
<p>{% blocktrans trimmed %}
|
<p>{% blocktrans trimmed %}
|
||||||
Please transfer the full amount to the following bank account:
|
Please transfer the full amount to the following bank account:
|
||||||
{% endblocktrans %}</p>
|
{% endblocktrans %}</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user