mirror of
https://github.com/ae-utbm/sith.git
synced 2026-06-05 15:49:21 +00:00
one CGV button for and etransaction and sith account
This commit is contained in:
@@ -141,7 +141,6 @@ form {
|
|||||||
display: block;
|
display: block;
|
||||||
margin: calc(var(--nf-input-size) * 1.5) auto 10px;
|
margin: calc(var(--nf-input-size) * 1.5) auto 10px;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
white-space: nowrap;
|
|
||||||
|
|
||||||
.fields-centered {
|
.fields-centered {
|
||||||
padding: 10px 10px 0;
|
padding: 10px 10px 0;
|
||||||
|
|||||||
@@ -63,20 +63,35 @@
|
|||||||
<div @htmx:after-request="fill">
|
<div @htmx:after-request="fill">
|
||||||
{{ billing_infos_form }}
|
{{ billing_infos_form }}
|
||||||
</div>
|
</div>
|
||||||
{% 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 #}
|
||||||
|
<form id="cgv-form" x-ref="cgvForm">
|
||||||
|
{# 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. #}
|
||||||
|
<div class="form-group margin-bottom">
|
||||||
|
<input type="checkbox" id="cgv-checkbox" name="cgv" required>
|
||||||
|
<label for="cgv-checkbox">
|
||||||
|
{% trans trimmed %}I have read and I accept{% endtrans %}
|
||||||
|
<a href="{{ url('core:page', 'cgv') }}">{% trans %}the general terms and conditions{% endtrans%}</a>
|
||||||
|
{%trans%}of the student association of the UTBM{% endtrans %}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
{% if settings.SITH_EBOUTIC_CB_ENABLED %}
|
||||||
<form
|
<form
|
||||||
method="post"
|
method="post"
|
||||||
|
id="bank-payment-form"
|
||||||
action="{{ settings.SITH_EBOUTIC_ET_URL }}"
|
action="{{ settings.SITH_EBOUTIC_ET_URL }}"
|
||||||
|
@submit="if (!$refs.cgvForm.reportValidity()) $event.preventDefault()"
|
||||||
>
|
>
|
||||||
<template x-for="[key, value] in Object.entries(data)" :key="key">
|
<template x-for="[key, value] in Object.entries(data)" :key="key">
|
||||||
<input type="hidden" :name="key" :value="value">
|
<input type="hidden" :name="key" :value="value">
|
||||||
</template>
|
</template>
|
||||||
<input type="checkbox" value="cgv" required>
|
|
||||||
<label>
|
|
||||||
{% trans trimmed %}I have read and accept {% endtrans %}
|
|
||||||
<a href="">{% trans %}the general terms and conditions{% endtrans%}</a>
|
|
||||||
{%trans%}of the student assosiation of UTBM{% endtrans %}</label>
|
|
||||||
<br>
|
|
||||||
<input
|
<input
|
||||||
x-cloak
|
x-cloak
|
||||||
type="submit"
|
type="submit"
|
||||||
@@ -104,14 +119,13 @@
|
|||||||
{% elif basket.total > user.account_balance %}
|
{% elif basket.total > user.account_balance %}
|
||||||
<p>{% trans %}AE account payment disabled because you do not have enough money remaining.{% endtrans %}</p>
|
<p>{% trans %}AE account payment disabled because you do not have enough money remaining.{% endtrans %}</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form method="post" action="{{ url('eboutic:pay_with_sith', basket_id=basket.id) }}" name="sith-pay-form">
|
<form
|
||||||
|
method="post"
|
||||||
|
action="{{ url('eboutic:pay_with_sith', basket_id=basket.id) }}"
|
||||||
|
id="sith-payment-form"
|
||||||
|
@submit="if (!$refs.cgvForm.reportValidity()) $event.preventDefault()"
|
||||||
|
>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="checkbox" value="cgv" required>
|
|
||||||
<label>
|
|
||||||
{% trans trimmed %}I have read and accept {% endtrans %}
|
|
||||||
<a href="">{% trans %}the general terms and conditions{% endtrans%}</a>
|
|
||||||
{%trans%}of the student assosiation of UTBM{% endtrans %}</label>
|
|
||||||
<br>
|
|
||||||
<input
|
<input
|
||||||
{% if basket.is_expired %}
|
{% if basket.is_expired %}
|
||||||
disabled="disabled"
|
disabled="disabled"
|
||||||
|
|||||||
Reference in New Issue
Block a user