forked from CGM_Public/pretix_original
Bank transfer: Allow to set custom public name
This commit is contained in:
@@ -8,6 +8,7 @@ from django.http import HttpRequest
|
|||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from i18nfield.fields import I18nFormField, I18nTextarea
|
from i18nfield.fields import I18nFormField, I18nTextarea
|
||||||
|
from i18nfield.forms import I18nTextInput
|
||||||
from i18nfield.strings import LazyI18nString
|
from i18nfield.strings import LazyI18nString
|
||||||
from localflavor.generic.forms import BICFormField, IBANFormField
|
from localflavor.generic.forms import BICFormField, IBANFormField
|
||||||
|
|
||||||
@@ -88,9 +89,18 @@ class BankTransfer(BasePaymentProvider):
|
|||||||
),
|
),
|
||||||
}},
|
}},
|
||||||
required=False
|
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
|
@property
|
||||||
def settings_form_fields(self):
|
def settings_form_fields(self):
|
||||||
d = OrderedDict(
|
d = OrderedDict(
|
||||||
|
|||||||
Reference in New Issue
Block a user