mirror of
https://github.com/ae-utbm/sith.git
synced 2025-03-28 08:07:10 +00:00
30 lines
773 B
Django/Jinja
30 lines
773 B
Django/Jinja
<div id="student_card_form">
|
|
<h3>{% trans %}Add a student card{% endtrans %}</h3>
|
|
<form
|
|
hx-post="{{ action }}"
|
|
hx-swap="outerHTML"
|
|
hx-target="#student_card_form"
|
|
>
|
|
{% csrf_token %}
|
|
{{ form.as_p() }}
|
|
<button>{% trans %}Go{% endtrans %}</button>
|
|
|
|
</form>
|
|
<h6>{% trans %}Registered cards{% endtrans %}</h6>
|
|
{% if student_cards %}
|
|
|
|
<ul>
|
|
{% for card in student_cards %}
|
|
<li>
|
|
{{ card.uid }}
|
|
<a href="{{ url('counter:delete_student_card', customer_id=customer.pk, card_id=card.id) }}">
|
|
{% trans %}Delete{% endtrans %}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<em class="no-cards">{% trans %}No student card registered.{% endtrans %}</em>
|
|
{% endif %}
|
|
</div>
|