Make redirections after voucher redemption more consistent

This commit is contained in:
Raphael Michel
2023-10-27 11:47:22 +02:00
parent c325cc1120
commit b32249d48b
3 changed files with 15 additions and 5 deletions

View File

@@ -20,7 +20,7 @@
</div>
</div>
<input type="hidden" name="subevent" value="{{ subevent.id|default_if_none:"" }}" />
<input type="hidden" name="next" value="{{ request.path }}" />
<input type="hidden" name="next" value="{% if next_url %}{{ next_url }}{% else %}{{ request.path }}{% endif %}" />
<div class="col-md-4 col-sm-6 col-xs-12">
<button class="btn btn-block btn-primary" type="submit">
{% trans "Redeem voucher" %}

View File

@@ -9,6 +9,10 @@
{% block title %}{% trans "Voucher redemption" %}{% endblock %}
{% block content %}
{% if show_cart %}
{% include "pretixpresale/event/fragment_cart_box.html" with open=request.GET.show_cart %}
{% endif %}
<h2>{% trans "Redeem a voucher" %}</h2>
{% include "pretixpresale/event/fragment_voucher_form.html" %}
{% include "pretixpresale/event/fragment_voucher_form.html" with next_url=request.path|add:"?show_cart=true" %}
{% endblock %}