Show voucher link in voucher detail view

This commit is contained in:
Raphael Michel
2019-03-13 11:22:50 +01:00
parent 068983004a
commit 4bf0d2d229

View File

@@ -2,6 +2,7 @@
{% load i18n %}
{% load bootstrap3 %}
{% load eventsignal %}
{% load eventurl %}
{% block title %}{% trans "Voucher" %}{% endblock %}
{% block inside %}
<h1>{% trans "Voucher" %}</h1>
@@ -25,6 +26,17 @@
<fieldset>
<legend>{% trans "Voucher details" %}</legend>
{% bootstrap_field form.code layout="control" %}
{% if voucher.pk %}
<div class="form-group">
<label class="col-md-3 control-label" for="id_url">{% trans "Voucher link" %}</label>
<div class="col-md-9">
<input type="text" name="url"
value="{% abseventurl request.event "presale:event.redeem" %}?voucher={{ voucher.code }}"
class="form-control"
id="id_url" readonly>
</div>
</div>
{% endif %}
{% bootstrap_field form.max_usages layout="control" %}
{% bootstrap_field form.valid_until layout="control" %}
{% bootstrap_field form.block_quota layout="control" %}