mirror of
https://github.com/ae-utbm/sith.git
synced 2025-05-18 16:27:32 +00:00
fix makecommand jinja indentation
This commit is contained in:
parent
d03c425a17
commit
d98718f7ba
@ -33,116 +33,116 @@
|
|||||||
<td>{{ item.product_unit_price }} €</td>
|
<td>{{ item.product_unit_price }} €</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>{% trans %}Basket amount: {% endtrans %}{{ "%0.2f"|format(basket.total) }} €</strong>
|
<strong>{% trans %}Basket amount: {% endtrans %}{{ "%0.2f"|format(basket.total) }} €</strong>
|
||||||
|
|
||||||
{% if customer_amount != None %}
|
{% if customer_amount != None %}
|
||||||
<br>
|
|
||||||
{% trans %}Current account amount: {% endtrans %}
|
|
||||||
<strong>{{ "%0.2f"|format(customer_amount) }} €</strong>
|
|
||||||
|
|
||||||
{% if not basket.contains_refilling_item %}
|
|
||||||
<br>
|
|
||||||
{% trans %}Remaining account amount: {% endtrans %}
|
|
||||||
<strong>{{ "%0.2f"|format(customer_amount|float - basket.total) }} €</strong>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
<br>
|
<br>
|
||||||
{% if settings.SITH_EBOUTIC_CB_ENABLED %}
|
{% trans %}Current account amount: {% endtrans %}
|
||||||
<div
|
<strong>{{ "%0.2f"|format(customer_amount) }} €</strong>
|
||||||
class="collapse"
|
|
||||||
:class="{'shadow': collapsed}"
|
{% if not basket.contains_refilling_item %}
|
||||||
x-data="{collapsed: !{{ "true" if billing_infos else "false" }}}"
|
|
||||||
x-cloak
|
|
||||||
>
|
|
||||||
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
|
||||||
<span class="collapse-header-text">
|
|
||||||
{% trans %}Billing information{% endtrans %}
|
|
||||||
</span>
|
|
||||||
<span class="collapse-header-icon" :class="{'reverse': collapsed}">
|
|
||||||
<i class="fa fa-caret-down"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<form
|
|
||||||
class="collapse-body"
|
|
||||||
id="billing_info_form"
|
|
||||||
x-data="billing_infos({{ user.id }})"
|
|
||||||
x-show="collapsed"
|
|
||||||
x-transition.scale.origin.top
|
|
||||||
@submit.prevent="await sendForm()"
|
|
||||||
>
|
|
||||||
{% csrf_token %}
|
|
||||||
{{ billing_form }}
|
|
||||||
<br />
|
|
||||||
<div
|
|
||||||
x-show="[BillingInfoReqState.Success, BillingInfoReqState.Failure].includes(reqState)"
|
|
||||||
class="alert"
|
|
||||||
:class="'alert-' + getAlertColor()"
|
|
||||||
x-transition
|
|
||||||
>
|
|
||||||
<div class="alert-main" x-text="getAlertMessage()"></div>
|
|
||||||
<div class="clickable" @click="reqState = null">
|
|
||||||
<i class="fa fa-close"></i>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<input
|
|
||||||
type="submit" class="btn btn-blue clickable"
|
|
||||||
value="{% trans %}Validate{% endtrans %}"
|
|
||||||
:disabled="reqState === BillingInfoReqState.Sending"
|
|
||||||
>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<br>
|
<br>
|
||||||
{% if billing_infos_state == BillingInfoState.EMPTY %}
|
{% trans %}Remaining account amount: {% endtrans %}
|
||||||
<div class="alert alert-yellow">
|
<strong>{{ "%0.2f"|format(customer_amount|float - basket.total) }} €</strong>
|
||||||
{% trans trimmed %}
|
{% endif %}
|
||||||
You must fill your billing infos if you want to pay with your credit card
|
{% endif %}
|
||||||
{% endtrans %}
|
</p>
|
||||||
</div>
|
<br>
|
||||||
{% elif billing_infos_state == BillingInfoState.MISSING_PHONE_NUMBER %}
|
{% if settings.SITH_EBOUTIC_CB_ENABLED %}
|
||||||
<div class="alert alert-yellow">
|
<div
|
||||||
{% trans trimmed %}
|
class="collapse"
|
||||||
The Crédit Agricole changed its policy related to the billing
|
:class="{'shadow': collapsed}"
|
||||||
information that must be provided in order to pay with a credit card.
|
x-data="{collapsed: !{{ "true" if billing_infos else "false" }}}"
|
||||||
If you want to pay with your credit card, you must add a phone number
|
x-cloak
|
||||||
to the data you already provided.
|
>
|
||||||
{% endtrans %}
|
<div class="collapse-header clickable" @click="collapsed = !collapsed">
|
||||||
</div>
|
<span class="collapse-header-text">
|
||||||
{% endif %}
|
{% trans %}Billing information{% endtrans %}
|
||||||
<form
|
</span>
|
||||||
method="post"
|
<span class="collapse-header-icon" :class="{'reverse': collapsed}">
|
||||||
action="{{ settings.SITH_EBOUTIC_ET_URL }}"
|
<i class="fa fa-caret-down"></i>
|
||||||
name="bank-pay-form"
|
</span>
|
||||||
x-data="etransactionData(initialEtData)"
|
</div>
|
||||||
@billing-infos-filled.window="await fill()"
|
<form
|
||||||
|
class="collapse-body"
|
||||||
|
id="billing_info_form"
|
||||||
|
x-data="billing_infos({{ user.id }})"
|
||||||
|
x-show="collapsed"
|
||||||
|
x-transition.scale.origin.top
|
||||||
|
@submit.prevent="await sendForm()"
|
||||||
|
>
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ billing_form }}
|
||||||
|
<br />
|
||||||
|
<div
|
||||||
|
x-show="[BillingInfoReqState.Success, BillingInfoReqState.Failure].includes(reqState)"
|
||||||
|
class="alert"
|
||||||
|
:class="'alert-' + getAlertColor()"
|
||||||
|
x-transition
|
||||||
>
|
>
|
||||||
<template x-for="[key, value] in Object.entries(data)" :key="key">
|
<div class="alert-main" x-text="getAlertMessage()"></div>
|
||||||
<input type="hidden" :name="key" :value="value">
|
<div class="clickable" @click="reqState = null">
|
||||||
</template>
|
<i class="fa fa-close"></i>
|
||||||
<input
|
</div>
|
||||||
type="submit"
|
</div>
|
||||||
id="bank-submit-button"
|
<input
|
||||||
{% if billing_infos_state != BillingInfoState.VALID %}disabled="disabled"{% endif %}
|
type="submit" class="btn btn-blue clickable"
|
||||||
value="{% trans %}Pay with credit card{% endtrans %}"
|
value="{% trans %}Validate{% endtrans %}"
|
||||||
/>
|
:disabled="reqState === BillingInfoReqState.Sending"
|
||||||
</form>
|
>
|
||||||
{% endif %}
|
</form>
|
||||||
{% if basket.contains_refilling_item %}
|
|
||||||
<p>{% trans %}AE account payment disabled because your basket contains refilling items.{% endtrans %}</p>
|
|
||||||
{% elif basket.total > user.account_balance %}
|
|
||||||
<p>{% trans %}AE account payment disabled because you do not have enough money remaining.{% endtrans %}</p>
|
|
||||||
{% else %}
|
|
||||||
<form method="post" action="{{ url('eboutic:pay_with_sith') }}" name="sith-pay-form">
|
|
||||||
{% csrf_token %}
|
|
||||||
<input type="hidden" name="action" value="pay_with_sith_account">
|
|
||||||
<input type="submit" value="{% trans %}Pay with Sith account{% endtrans %}"/>
|
|
||||||
</form>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
|
{% if billing_infos_state == BillingInfoState.EMPTY %}
|
||||||
|
<div class="alert alert-yellow">
|
||||||
|
{% trans trimmed %}
|
||||||
|
You must fill your billing infos if you want to pay with your credit card
|
||||||
|
{% endtrans %}
|
||||||
|
</div>
|
||||||
|
{% elif billing_infos_state == BillingInfoState.MISSING_PHONE_NUMBER %}
|
||||||
|
<div class="alert alert-yellow">
|
||||||
|
{% trans trimmed %}
|
||||||
|
The Crédit Agricole changed its policy related to the billing
|
||||||
|
information that must be provided in order to pay with a credit card.
|
||||||
|
If you want to pay with your credit card, you must add a phone number
|
||||||
|
to the data you already provided.
|
||||||
|
{% endtrans %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<form
|
||||||
|
method="post"
|
||||||
|
action="{{ settings.SITH_EBOUTIC_ET_URL }}"
|
||||||
|
name="bank-pay-form"
|
||||||
|
x-data="etransactionData(initialEtData)"
|
||||||
|
@billing-infos-filled.window="await fill()"
|
||||||
|
>
|
||||||
|
<template x-for="[key, value] in Object.entries(data)" :key="key">
|
||||||
|
<input type="hidden" :name="key" :value="value">
|
||||||
|
</template>
|
||||||
|
<input
|
||||||
|
type="submit"
|
||||||
|
id="bank-submit-button"
|
||||||
|
{% if billing_infos_state != BillingInfoState.VALID %}disabled="disabled"{% endif %}
|
||||||
|
value="{% trans %}Pay with credit card{% endtrans %}"
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
{% if basket.contains_refilling_item %}
|
||||||
|
<p>{% trans %}AE account payment disabled because your basket contains refilling items.{% endtrans %}</p>
|
||||||
|
{% elif basket.total > user.account_balance %}
|
||||||
|
<p>{% trans %}AE account payment disabled because you do not have enough money remaining.{% endtrans %}</p>
|
||||||
|
{% else %}
|
||||||
|
<form method="post" action="{{ url('eboutic:pay_with_sith') }}" name="sith-pay-form">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden" name="action" value="pay_with_sith_account">
|
||||||
|
<input type="submit" value="{% trans %}Pay with Sith account{% endtrans %}"/>
|
||||||
|
</form>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block script %}
|
{% block script %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user