Code style improvements (#1411)

* docstring corrections

* move omit_hyphen formfield
This commit is contained in:
Felix Rindt
2019-09-20 09:34:24 +02:00
committed by Raphael Michel
parent 76e75bef65
commit 39eaf3ad6a
2 changed files with 8 additions and 12 deletions

View File

@@ -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)