From 89afdba055b2be2e52ae9a84783776839849e11b Mon Sep 17 00:00:00 2001 From: TitouanDor Date: Tue, 26 May 2026 23:30:23 +0200 Subject: [PATCH] one CGV button for and etransaction and sith account --- core/static/core/forms.scss | 1 - .../templates/eboutic/eboutic_checkout.jinja | 42 ++++++++++++------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/core/static/core/forms.scss b/core/static/core/forms.scss index 0982b3d0..511190b6 100644 --- a/core/static/core/forms.scss +++ b/core/static/core/forms.scss @@ -141,7 +141,6 @@ form { display: block; margin: calc(var(--nf-input-size) * 1.5) auto 10px; line-height: 1; - white-space: nowrap; .fields-centered { padding: 10px 10px 0; diff --git a/eboutic/templates/eboutic/eboutic_checkout.jinja b/eboutic/templates/eboutic/eboutic_checkout.jinja index d278cfa5..406f5d25 100644 --- a/eboutic/templates/eboutic/eboutic_checkout.jinja +++ b/eboutic/templates/eboutic/eboutic_checkout.jinja @@ -63,20 +63,35 @@
{{ billing_infos_form }}
- {% include "core/base/notifications.jinja" %} + {% endif %} + {% include "core/base/notifications.jinja" %} + {% if settings.SITH_EBOUTIC_CB_ENABLED or (basket.total <= user.account_balance and not basket.contains_refilling_item) %} + {# don't display the cgv form if no payment mean is available #} +
+ {# In order to have one CGV button for both payment means, + we have a third dummy form, containing only the cgv button, + which validation is triggered when one of the two other forms is submitted. + If the validation of this form fails, the submit event will be cancelled. #} +
+ + +
+
+ {% endif %} + {% if settings.SITH_EBOUTIC_CB_ENABLED %}
- - -
user.account_balance %}

{% trans %}AE account payment disabled because you do not have enough money remaining.{% endtrans %}

{% else %} - + {% csrf_token %} - - -