Show invoice address form once again before generating a new invoice

This commit is contained in:
Raphael Michel
2019-12-06 20:03:22 +01:00
parent 12b9d23efb
commit a74bde60eb
4 changed files with 59 additions and 33 deletions

View File

@@ -186,6 +186,11 @@
<div class="alert alert-info">
{% trans "You need to select a payment method above before you can request an invoice." %}
</div>
{% elif invoice_address_asked and order.invoice_address.is_empty %}
<a href="{% eventurl event "presale:event.order.modify" secret=order.secret order=order.code %}?generate_invoice=true"
class="btn btn-default">
{% trans "Request invoice" %}
</a>
{% else %}
<form class="form-inline helper-display-inline" method="post"
action="{% eventurl event "presale:event.order.geninvoice" order=order.code secret=order.secret %}">

View File

@@ -13,7 +13,7 @@
{% csrf_token %}
<div class="panel-group" id="questions_accordion">
{% if invoice_address_asked or event.settings.invoice_name_required %}
{% if invoice_address_asked %}
{% if invoice_address_asked and not request.GET.generate_invoice == "true" %}
<div class="alert alert-info">
{% blocktrans trimmed %}
Modifying your invoice address will not automatically generate a new invoice.
@@ -81,7 +81,11 @@
</div>
<div class="col-md-4 col-md-offset-4">
<button class="btn btn-block btn-primary btn-lg" type="submit">
{% trans "Save changes" %}
{% if request.GET.generate_invoice == "true" %}
{% trans "Request invoice" %}
{% else %}
{% trans "Save changes" %}
{% endif %}
</button>
</div>
<div class="clearfix"></div>