From 55fb89a63e8beb8fdf8420ae1577817f3dc62b37 Mon Sep 17 00:00:00 2001 From: Sli Date: Thu, 14 Nov 2024 16:53:39 +0100 Subject: [PATCH] Intercept htmx on submit requests, this allows auto submit from nfc fields --- .../counter/add_student_card_fragment.jinja | 15 +++++++-------- counter/templates/counter/counter_click.jinja | 12 +++++++----- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/counter/templates/counter/add_student_card_fragment.jinja b/counter/templates/counter/add_student_card_fragment.jinja index 6446ae01..aa2150e1 100644 --- a/counter/templates/counter/add_student_card_fragment.jinja +++ b/counter/templates/counter/add_student_card_fragment.jinja @@ -1,15 +1,14 @@

{% trans %}Add a student card{% endtrans %}

-
+ {% csrf_token %} {{ form.as_p() }} - +
{% trans %}Registered cards{% endtrans %}
diff --git a/counter/templates/counter/counter_click.jinja b/counter/templates/counter/counter_click.jinja index e72eb77e..3c153879 100644 --- a/counter/templates/counter/counter_click.jinja +++ b/counter/templates/counter/counter_click.jinja @@ -30,11 +30,13 @@ {{ user_subscription(customer.user) }}

{% trans %}Amount: {% endtrans %}{{ customer.amount }} €

-
+ {% if counter.type == 'BAR' %} +
+ {% endif %}