Bank transfer: Allow markdown in accoutn details

This commit is contained in:
jasle
2025-10-21 10:54:39 +02:00
committed by GitHub
parent 0ab633ce7b
commit 15ea7c65e4
4 changed files with 7 additions and 4 deletions

View File

@@ -48,6 +48,7 @@ from localflavor.generic.forms import BICFormField, IBANFormField
from localflavor.generic.validators import IBANValidator from localflavor.generic.validators import IBANValidator
from text_unidecode import unidecode from text_unidecode import unidecode
from pretix.base.forms import I18nMarkdownTextarea
from pretix.base.models import InvoiceAddress, Order, OrderPayment, OrderRefund from pretix.base.models import InvoiceAddress, Order, OrderPayment, OrderRefund
from pretix.base.payment import BasePaymentProvider from pretix.base.payment import BasePaymentProvider
from pretix.base.templatetags.money import money_filter from pretix.base.templatetags.money import money_filter
@@ -124,7 +125,7 @@ class BankTransfer(BasePaymentProvider):
)), )),
('bank_details', I18nFormField( ('bank_details', I18nFormField(
label=_('Bank account details'), label=_('Bank account details'),
widget=I18nTextarea, widget=I18nMarkdownTextarea,
help_text=_( help_text=_(
'Include everything else that your customers might need to send you a bank transfer payment. ' 'Include everything else that your customers might need to send you a bank transfer payment. '
'If you have lots of international customers, they might need your full address and your ' 'If you have lots of international customers, they might need your full address and your '

View File

@@ -1,6 +1,7 @@
{% load i18n %} {% load i18n %}
{% load ibanformat %} {% load ibanformat %}
{% load bootstrap3 %} {% load bootstrap3 %}
{% load rich_text %}
{% if details or code %} {% if details or code %}
<p>{% blocktrans trimmed %} <p>{% blocktrans trimmed %}
@@ -18,7 +19,7 @@
</dl> </dl>
{% endif %} {% endif %}
{{ details|linebreaks }} {{ details | rich_text }}
{% if not code %}</div>{% endif %} {% if not code %}</div>{% endif %}
{% if code %} {% if code %}

View File

@@ -1,5 +1,6 @@
{% load i18n %} {% load i18n %}
{% load ibanformat %} {% load ibanformat %}
{% load rich_text %}
{% if details or code %} {% if details or code %}
<p>{% blocktrans trimmed %} <p>{% blocktrans trimmed %}
@@ -17,7 +18,7 @@
</dl> </dl>
{% endif %} {% endif %}
{{ details|linebreaks }} {{ details | rich_text }}
{% if not code %}</div>{% endif %} {% if not code %}</div>{% endif %}
{% if code %} {% if code %}

View File

@@ -29,7 +29,7 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if details %} {% if details %}
{{ details|linebreaks }} {{ details | rich_text }}
<dl class="dl-horizontal"> <dl class="dl-horizontal">
{% endif %} {% endif %}
{% if not settings.bank_details_type == "sepa" and not details %} {% if not settings.bank_details_type == "sepa" and not details %}