mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Checkout UX: Pre-select payment provider if there is only one
This commit is contained in:
@@ -430,6 +430,8 @@ class PaymentStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
|
||||
ctx['providers'] = self.provider_forms
|
||||
ctx['show_fees'] = any(p['fee'] for p in self.provider_forms)
|
||||
ctx['selected'] = self.request.POST.get('payment', self.cart_session.get('payment', ''))
|
||||
if len(self.provider_forms) == 1:
|
||||
ctx['selected'] = self.provider_forms[0]['provider'].identifier
|
||||
return ctx
|
||||
|
||||
@cached_property
|
||||
|
||||
Reference in New Issue
Block a user