[A11y] fix giftcard-checkout error messages (#5175)

* [A11y] fix giftcard-checkout error messages

* move validation to payment_form

* Update checkout_payment.html

* move already-used check to clean as well

* fix tests

* fix code style issue

* fix giftcard-payment in redeem-view

* Fix responsiveness on checkout

* Fix paying for existing orders

* fix cart.py for new GiftCardPaymentForm-signature

* fix order_tests

---------

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Richard Schreiber
2025-05-30 13:29:33 +02:00
committed by GitHub
parent 1752b2f037
commit 66a4a34383
7 changed files with 219 additions and 134 deletions

View File

@@ -683,6 +683,8 @@ class OrderPayChangeMethod(EventViewMixin, OrderDetailMixin, TemplateView):
ctx['show_fees'] = any(p['fee_diff'] for p in self.provider_forms)
if len(self.provider_forms) == 1:
ctx['selected'] = self.provider_forms[0]['provider'].identifier
elif "payment" in self.request.POST:
ctx['selected'] = self.request.POST.get("payment")
return ctx
def get_confirm_url(self, payment):