mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Code style improvements (#1411)
* docstring corrections * move omit_hyphen formfield
This commit is contained in:
committed by
Raphael Michel
parent
76e75bef65
commit
39eaf3ad6a
@@ -531,7 +531,7 @@ class BasePaymentProvider:
|
||||
containing the URL the user will be redirected to. If you are done with your process
|
||||
you should return the user to the order's detail page.
|
||||
|
||||
If the payment is completed, you should call ``payment.confirm()``. Please note that ``this`` might
|
||||
If the payment is completed, you should call ``payment.confirm()``. Please note that this might
|
||||
raise a ``Quota.QuotaExceededException`` if (and only if) the payment term of this order is over and
|
||||
some of the items are sold out. You should use the exception message to display a meaningful error
|
||||
to the user.
|
||||
|
||||
@@ -102,7 +102,12 @@ class BankTransfer(BasePaymentProvider):
|
||||
label=_('Payment method name'),
|
||||
widget=I18nTextInput,
|
||||
required=False
|
||||
))
|
||||
)),
|
||||
('omit_hyphen', forms.BooleanField(
|
||||
label=_('Do not include a hypen in the payment reference.'),
|
||||
help_text=_('This is required in some countries.'),
|
||||
required=False
|
||||
)),
|
||||
])
|
||||
|
||||
@property
|
||||
@@ -116,16 +121,7 @@ class BankTransfer(BasePaymentProvider):
|
||||
|
||||
@property
|
||||
def settings_form_fields(self):
|
||||
d = OrderedDict(
|
||||
list(super().settings_form_fields.items()) + list(BankTransfer.form_fields().items()) + [
|
||||
('omit_hyphen', forms.BooleanField(
|
||||
label=_('Do not include a hypen in the payment reference.'),
|
||||
help_text=_('This is required in some countries.'),
|
||||
required=False
|
||||
)),
|
||||
|
||||
]
|
||||
)
|
||||
d = OrderedDict(list(super().settings_form_fields.items()) + list(BankTransfer.form_fields().items()))
|
||||
d.move_to_end('bank_details', last=False)
|
||||
d.move_to_end('bank_details_sepa_bank', last=False)
|
||||
d.move_to_end('bank_details_sepa_bic', last=False)
|
||||
|
||||
Reference in New Issue
Block a user