2017-05-09 21:42:01 +00:00
{% extends "core/base.jinja" %}
{% block title %}
{% trans %} Preferences {% endtrans %}
{% endblock %}
{% block content %}
<h2> {% trans %} Preferences {% endtrans %} </h2>
<form action="" method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form .as_p ( ) }}
<p><input type="submit" value=" {% trans %} Save {% endtrans %} " /></p>
</form>
2017-05-10 21:30:20 +00:00
<h4> {% trans %} Trombi {% endtrans %} </h4>
2017-05-10 20:17:05 +00:00
{% if trombi_form %}
<form action=" {{ url ( 'trombi:user_tools' ) }} " method="post" enctype="multipart/form-data">
2017-05-09 21:42:01 +00:00
{% csrf_token %}
2017-05-10 20:17:05 +00:00
{{ trombi_form .as_p ( ) }}
2017-05-09 21:42:01 +00:00
<p><input type="submit" value=" {% trans %} Save {% endtrans %} " /></p>
</form>
{% else %}
2017-05-10 21:30:20 +00:00
<p> {% trans trombi = user .trombi_user .trombi %} You already choose to be in that Trombi: {{ trombi }} . {% endtrans %}
<a href=" {{ url ( 'trombi:user_tools' ) }} "> {% trans %} Go to my Trombi tools {% endtrans %} </a></p>
2017-05-09 21:42:01 +00:00
{% endif %}
2018-10-19 17:25:55 +00:00
{% if profile .customer %}
<h4> {% trans %} Student cards {% endtrans %} </h4>
<p> {% trans %} You can add a card by asking at a counter or add it yourself here. If you want to manually add a student card yourself, you'll need a NFC reader. We store the UID of the card which is 14 characters long. {% endtrans %} </p>
<form action=" {{ url ( 'counter:add_student_card' , customer_id = profile .customer .pk ) }} " method="post">
{% csrf_token %}
{{ student_card_form .as_p ( ) }}
<p><input type="submit" value=" {% trans %} Save {% endtrans %} " /></p>
</form>
{% if profile .customer .student_cards .exists ( ) %}
<ul>
{% for card in profile .customer .student_cards .all ( ) %}
<li> {{ card .uid }} - <a href=" {{ url ( 'counter:delete_student_card' , customer_id = profile .customer .pk , card_id = card .id ) }} "> {% trans %} Delete {% endtrans %} </a></li>
{% endfor %}
</ul>
{% else %}
<p> {% trans %} No student cards registered. {% endtrans %} </p>
{% endif %}
{% endif %}
2017-05-09 21:42:01 +00:00
{% endblock %}