forked from CGM_Public/pretix_original
Allow not to ask for invoice addresses on free orders
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
{% endif %}
|
||||
{% eventsignal event "pretix.presale.signals.checkout_confirm_page_content" request=request %}
|
||||
<div class="row">
|
||||
{% if request.event.settings.invoice_address_asked %}
|
||||
{% if invoice_address_asked %}
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div class="panel panel-primary panel-contact">
|
||||
<div class="panel-heading">
|
||||
@@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="{% if request.event.settings.invoice_address_asked %}col-md-6{% endif %} col-xs-12">
|
||||
<div class="{% if invoice_address_asked %}col-md-6{% endif %} col-xs-12">
|
||||
<div class="panel panel-primary panel-contact">
|
||||
<div class="panel-heading">
|
||||
<div class="pull-right">
|
||||
@@ -125,7 +125,7 @@
|
||||
</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
{% if not event.settings.invoice_address_asked and event.settings.invoice_name_required %}
|
||||
{% if not asked and event.settings.invoice_name_required %}
|
||||
<dl class="dl-horizontal">
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ addr.name }}</dd>
|
||||
|
||||
@@ -22,13 +22,13 @@
|
||||
<div id="contact">
|
||||
<div class="panel-body">
|
||||
{% bootstrap_form contact_form layout="horizontal" %}
|
||||
{% if not event.settings.invoice_address_asked and event.settings.invoice_name_required %}
|
||||
{% if not invoice_address_asked and event.settings.invoice_name_required %}
|
||||
{% bootstrap_form invoice_form layout="horizontal" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
{% if event.settings.invoice_address_asked %}
|
||||
{% if invoice_address_asked %}
|
||||
<details class="panel panel-default" {% if event.settings.invoice_address_required or event.settings.invoice_name_required %}open{% endif %}>
|
||||
<summary class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
{% eventsignal event "pretix.presale.signals.order_info" order=order %}
|
||||
<div class="row">
|
||||
{% if invoices %}
|
||||
<div class="col-xs-12 {% if request.event.settings.invoice_address_asked or request.event.settings.invoice_name_required %}col-md-6{% endif %}">
|
||||
<div class="col-xs-12 {% if invoice_address_asked or request.event.settings.invoice_name_required %}col-md-6{% endif %}">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
@@ -180,7 +180,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% elif can_generate_invoice %}
|
||||
<div class="col-xs-12 {% if request.event.settings.invoice_address_asked or request.event.settings.invoice_name_required %}col-md-6{% endif %}">
|
||||
<div class="col-xs-12 {% if invoice_address_asked or request.event.settings.invoice_name_required %}col-md-6{% endif %}">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">
|
||||
@@ -199,7 +199,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if request.event.settings.invoice_address_asked or request.event.settings.invoice_name_required %}
|
||||
{% if invoice_address_asked or request.event.settings.invoice_name_required %}
|
||||
<div class="col-xs-12 {% if invoices or can_generate_invoice %}col-md-6{% endif %}">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
@@ -221,13 +221,13 @@
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal">
|
||||
{% if request.event.settings.invoice_address_asked %}
|
||||
{% if invoice_address_asked %}
|
||||
<dt>{% trans "Company" %}</dt>
|
||||
<dd>{{ order.invoice_address.company }}</dd>
|
||||
{% endif %}
|
||||
<dt>{% trans "Name" %}</dt>
|
||||
<dd>{{ order.invoice_address.name }}</dd>
|
||||
{% if request.event.settings.invoice_address_asked %}
|
||||
{% if invoice_address_asked %}
|
||||
<dt>{% trans "Address" %}</dt>
|
||||
<dd>{{ order.invoice_address.street|linebreaksbr }}</dd>
|
||||
<dt>{% trans "ZIP code and city" %}</dt>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
<form class="form-horizontal" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
<div class="panel-group" id="questions_accordion">
|
||||
{% if event.settings.invoice_address_asked or event.settings.invoice_name_required %}
|
||||
{% if event.settings.invoice_address_asked %}
|
||||
{% if invoice_address_asked or event.settings.invoice_name_required %}
|
||||
{% if invoice_address_asked %}
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
Modifying your invoice address will not automatically generate a new invoice.
|
||||
@@ -25,7 +25,7 @@
|
||||
<summary class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<strong>
|
||||
{% if request.event.settings.invoice_address_asked %}
|
||||
{% if invoice_address_asked %}
|
||||
{% trans "Invoice information" %}{% if not event.settings.invoice_address_required %}
|
||||
{% trans "(optional)" %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user