mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-21 03:58:26 +02:00
Add payment information after payment
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -201,13 +201,82 @@
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div id="form-content">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">{% trans "Update" %}</button>
|
||||
</form>
|
||||
{% if user.registration.is_volunteer %}
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<div id="form-content">
|
||||
{% csrf_token %}
|
||||
{{ form|crispy }}
|
||||
</div>
|
||||
<button class="btn btn-primary" type="submit">{% trans "Update" %}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
{% if payment.type == 'helloasso' %}
|
||||
{% if payment.valid is True %}
|
||||
<div class="alert alert-success">
|
||||
{% with order=payment.get_checkout_intent.order %}
|
||||
{% trans "Your payment by credit card via Hello Asso is successfully validated." %}
|
||||
{% trans "The paid amount is" %} {% widthratio order.amount.total 100 1 %} €.
|
||||
{% if grouped %}
|
||||
{% trans "It includes the registrations of all members of the team." %}
|
||||
{% endif %}
|
||||
{% trans "The payer was " %} {{ order.payer.firstName }} {{ order.payer.lastName }}.
|
||||
{% trans "The payment was done on" %} {{ order.date }}.
|
||||
{% endwith %}
|
||||
</div>
|
||||
{% elif payment.valid is None %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "The payment by credit card via Hello Asso is pending validation." %}
|
||||
{% trans "It should takes only few minutes. If it takes longer, please contact us." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if payment.valid is True %}
|
||||
<div class="alert alert-success">
|
||||
{% trans "Your payment is successfully validated by the organizers." %}
|
||||
<ul>
|
||||
<li>{% trans "Type:" %} {{ payment.get_type_display }}</li>
|
||||
<li>
|
||||
{% trans "Amount:" %} {{ payment.amount }} €
|
||||
{% if payment.grouped %}
|
||||
({% trans "It includes the registrations of all members of the team." %})
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if payment.receipt %}
|
||||
<li>
|
||||
{% trans "Receipt:" %}
|
||||
<a href="{{ payment.receipt.url }}"><i class="fas fa-download"></i> {% trans "Download" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if payment.additional_information %}
|
||||
<li>{% trans "Additional information:" %} {{ payment.additional_information }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% elif payment.valid is None %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "Your payment is pending validation from the organizers." %}
|
||||
<ul>
|
||||
<li>{% trans "Type:" %} {{ payment.get_type_display }}</li>
|
||||
<li>
|
||||
{% trans "Amount:" %} {{ payment.amount }} €
|
||||
{% if payment.grouped %}
|
||||
({% trans "It includes the registrations of all members of the team." %})
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if payment.receipt %}
|
||||
<li>
|
||||
{% trans "Receipt:" %}
|
||||
<a href="{{ payment.receipt.url }}"><i class="fas fa-download"></i> {% trans "Download" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if payment.additional_information %}
|
||||
<li>{% trans "Additional information:" %} {{ payment.additional_information }}</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
|
||||
|
Reference in New Issue
Block a user