forked from CGM_Public/pretix_original
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
|
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.
|
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
|
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
|
some of the items are sold out. You should use the exception message to display a meaningful error
|
||||||
to the user.
|
to the user.
|
||||||
|
|||||||
@@ -102,7 +102,12 @@ class BankTransfer(BasePaymentProvider):
|
|||||||
label=_('Payment method name'),
|
label=_('Payment method name'),
|
||||||
widget=I18nTextInput,
|
widget=I18nTextInput,
|
||||||
required=False
|
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
|
@property
|
||||||
@@ -116,16 +121,7 @@ class BankTransfer(BasePaymentProvider):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def settings_form_fields(self):
|
def settings_form_fields(self):
|
||||||
d = OrderedDict(
|
d = OrderedDict(list(super().settings_form_fields.items()) + list(BankTransfer.form_fields().items()))
|
||||||
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.move_to_end('bank_details', last=False)
|
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_bank', last=False)
|
||||||
d.move_to_end('bank_details_sepa_bic', last=False)
|
d.move_to_end('bank_details_sepa_bic', last=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user