forked from CGM_Public/pretix_original
Allow to enter a voucher before choosing a subevent
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% load i18n %}
|
||||
{% load eventurl %}
|
||||
{% for subev in subevent_list %}
|
||||
<a href="{% eventurl event "presale:event.index" subevent=subev.id cart_namespace=cart_namespace %}"
|
||||
<a href="{% if request.GET.voucher %}{% eventurl event "presale:event.redeem" cart_namespace=cart_namespace %}?voucher={{ request.GET.voucher|urlencode }}&subevent={{ subev.pk }}{% else %}{% eventurl event "presale:event.index" subevent=subev.id cart_namespace=cart_namespace %}{% endif %}"
|
||||
class="subevent-row">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -101,6 +101,12 @@
|
||||
{{ frontpage_text|rich_text }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if request.GET.voucher %}
|
||||
<div class="alert alert-info">
|
||||
{% trans "Please select a date to redeem your voucher." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if subevent and "year" not in request.GET %}
|
||||
|
||||
@@ -10,7 +10,13 @@
|
||||
|
||||
{% block content %}
|
||||
<h2>{% trans "Voucher redemption" %}</h2>
|
||||
|
||||
{% if subevent %}
|
||||
{% if request.GET.subevent and subevent.pk|stringformat:"i" != request.GET.subevent %}
|
||||
<div class="alert alert-warning">
|
||||
{% trans "This voucher is valid only for the following specific date and time." %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<h3>{{ subevent.name }}</h3>
|
||||
{% with ev=subevent %}
|
||||
<div class="info-row">
|
||||
|
||||
Reference in New Issue
Block a user