From 228ab159001e3c9f821716b8ec2adee728a77a04 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Sat, 12 Jan 2019 16:06:21 +0100 Subject: [PATCH] Bank transfer: Allow to set custom public name --- src/pretix/plugins/banktransfer/payment.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pretix/plugins/banktransfer/payment.py b/src/pretix/plugins/banktransfer/payment.py index 67e32cdf4..46b703c8d 100644 --- a/src/pretix/plugins/banktransfer/payment.py +++ b/src/pretix/plugins/banktransfer/payment.py @@ -8,6 +8,7 @@ from django.http import HttpRequest from django.template.loader import get_template from django.utils.translation import ugettext_lazy as _ from i18nfield.fields import I18nFormField, I18nTextarea +from i18nfield.forms import I18nTextInput from i18nfield.strings import LazyI18nString from localflavor.generic.forms import BICFormField, IBANFormField @@ -88,9 +89,18 @@ class BankTransfer(BasePaymentProvider): ), }}, required=False + )), + ('public_name', I18nFormField( + label=_('Payment method name'), + widget=I18nTextInput, + required=False )) ]) + @property + def public_name(self): + return str(self.settings.get('public_name', as_type=LazyI18nString)) or self.verbose_name + @property def settings_form_fields(self): d = OrderedDict(