Added voucher redemption

This commit is contained in:
Raphael Michel
2016-02-11 16:41:22 +01:00
parent bcde964ea3
commit f18a180ae4
15 changed files with 226 additions and 66 deletions

View File

@@ -4,6 +4,11 @@
{% block title %}{% trans "Voucher" %}{% endblock %}
{% block inside %}
<h1>{% trans "Voucher" %}</h1>
{% if voucher.redeemed %}
<div class="alert alert-warning">
{% trans "This voucher already has been used. It is not recommended to modify it." %}
</div>
{% endif %}
<form action="" method="post" class="form-horizontal">
{% csrf_token %}
{% bootstrap_form_errors form %}

View File

@@ -25,7 +25,7 @@
<strong><a href="
{% url "control:event.voucher" organizer=request.event.organizer.slug event=request.event.slug voucher=v.id %}">{{ v.code }}</a></strong>
</td>
<td>{% if v.is_ordered %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</td>
<td>{% if v.redeemed %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</td>
<td>{{ v.valid_until|date }}</td>
<td>{{ v.item }}</td>
<td class="text-right">