mirror of
https://github.com/ae-utbm/sith.git
synced 2026-06-05 07:39:21 +00:00
Juste one CGU checkbox
This commit is contained in:
@@ -63,16 +63,12 @@
|
|||||||
<form
|
<form
|
||||||
method="post"
|
method="post"
|
||||||
action="{{ settings.SITH_EBOUTIC_ET_URL }}"
|
action="{{ settings.SITH_EBOUTIC_ET_URL }}"
|
||||||
|
id="bank-form"
|
||||||
|
onsubmit="return validateCgv()"
|
||||||
>
|
>
|
||||||
<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"
|
||||||
@@ -100,7 +96,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) }}"
|
||||||
|
name="sith-pay-form"
|
||||||
|
id="sith-form"
|
||||||
|
onsubmit="return validateCgv()"
|
||||||
|
>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input
|
<input
|
||||||
{% if basket.is_expired %}
|
{% if basket.is_expired %}
|
||||||
@@ -114,5 +116,26 @@
|
|||||||
/>
|
/>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="cgv-block">
|
||||||
|
<input type="checkbox" id="cgv" name="cgv" value="1" required>
|
||||||
|
<label for="cgv">
|
||||||
|
{% 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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function validateCgv() {
|
||||||
|
const checkbox = document.getElementById('cgv');
|
||||||
|
if (!checkbox.checked) {
|
||||||
|
checkbox.focus();
|
||||||
|
alert("Please accept the general terms and conditions.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user