[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

@@ -16,16 +16,17 @@
{% for p in current_payments %}
<div class="list-group-item">
<div class="row">
<div class="col-xs-9">
{{ p.provider_name }}
<div class="col-md-7 col-sm-6 col-xs-8">
<strong id="payment-label-{{ forloop.counter }}">{{ p.provider_name }}</strong>
</div>
<div class="col-xs-2 text-right">
<div class="col-md-2 col-sm-2 col-xs-4 text-right">
{{ p.payment_amount|money:request.event.currency }}
</div>
<div class="col-xs-1 text-right">
<button name="remove_payment" value="{{ p.id }}" title="{% trans "Remove payment" %}"
class="btn btn-link btn-xs">
<span class="fa fa-trash text-danger"></span>
<div class="col-md-3 col-sm-4 col-xs-12 text-right">
<button name="remove_payment" value="{{ p.id }}" aria-describedby="payment-label-{{ forloop.counter }}"
class="btn btn-danger">
<span class="fa fa-trash"></span>
{% trans "Remove payment" %}
</button>
</div>
</div>
@@ -34,11 +35,11 @@
{% if remaining %}
<div class="list-group-item">
<div class="row">
<div class="col-xs-9">
<div class="col-md-7 col-sm-6 col-xs-8">
<strong>{% trans "Remaining balance" %}</strong><br>
<span class="text-muted">{% trans "Please select a payment method below." %}</span>
</div>
<div class="col-xs-2 text-right">
<div class="col-md-2 col-sm-2 col-xs-4 text-right">
<strong>
{{ remaining|money:request.event.currency }}
</strong>