mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-23 10:49:31 +00:00
Make StudentCardFormView fragment only
This commit is contained in:
1 parent
b81cf49d0a
commit
d4b9c3afb1
8 files changed
+233
-187
No files matched your search
@@ -32,7 +32,7 @@
|
||||
|
||||
{% if counter.type == 'BAR' %}
|
||||
<div
|
||||
hx-get="{{ url('counter:add_student_card_fragment', counter_id=counter.id, customer_id=customer.pk) }}"
|
||||
hx-get="{{ url('counter:add_student_card', customer_id=customer.pk) }}"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML"
|
||||
>
|
||||
|
||||
+7
-3
@@ -1,7 +1,6 @@
|
||||
<div id="student_card_form">
|
||||
<h3>{% trans %}Add a student card{% endtrans %}</h3>
|
||||
<form
|
||||
hx-trigger="submit"
|
||||
hx-post="{{ action }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#student_card_form"
|
||||
@@ -16,10 +15,15 @@
|
||||
|
||||
<ul>
|
||||
{% for card in student_cards %}
|
||||
<li>{{ card.uid }}</li>
|
||||
<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 %}
|
||||
{% trans %}No card registered{% endtrans %}
|
||||
<em class="no-cards">{% trans %}No student card registered.{% endtrans %}</em>
|
||||
{% endif %}
|
||||
</div>
|
||||
Reference in new issue
Block a user