Add quick-start assistant for new users (#833)

* First draft for quick-setup

* Add payment

* Fix stripe w/o connect

* cols

* Add tests
This commit is contained in:
Raphael Michel
2018-03-26 20:52:24 +02:00
committed by GitHub
parent d578dedd0c
commit 28506538a3
16 changed files with 781 additions and 40 deletions

View File

@@ -14,9 +14,9 @@ class BankTransfer(BasePaymentProvider):
identifier = 'banktransfer'
verbose_name = _('Bank transfer')
@property
def settings_form_fields(self):
form_field = I18nFormField(
@staticmethod
def form_field(**kwargs):
return I18nFormField(
label=_('Bank account details'),
widget=I18nTextarea,
help_text=_('Include everything that your customers need to send you a bank transfer payment. Within SEPA '
@@ -30,10 +30,14 @@ class BankTransfer(BasePaymentProvider):
'Account owner: John Doe\n'
'Name of Bank: Professional Banking Institute Ltd., London'
)
}}
}},
**kwargs
)
@property
def settings_form_fields(self):
d = OrderedDict(
list(super().settings_form_fields.items()) + [('bank_details', form_field)]
list(super().settings_form_fields.items()) + [('bank_details', self.form_field())]
)
d.move_to_end('bank_details', last=False)
d.move_to_end('_enabled', last=False)