forked from CGM_Public/pretix_original
Allow to add a custom text above the invoice address
This commit is contained in:
@@ -73,6 +73,10 @@ DEFAULTS = {
|
|||||||
'default': 'False',
|
'default': 'False',
|
||||||
'type': bool,
|
'type': bool,
|
||||||
},
|
},
|
||||||
|
'invoice_address_explanation_text': {
|
||||||
|
'default': '',
|
||||||
|
'type': LazyI18nString
|
||||||
|
},
|
||||||
'invoice_include_free': {
|
'invoice_include_free': {
|
||||||
'default': 'True',
|
'default': 'True',
|
||||||
'type': bool,
|
'type': bool,
|
||||||
|
|||||||
@@ -627,6 +627,13 @@ class InvoiceSettingsForm(SettingsForm):
|
|||||||
"products."),
|
"products."),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
invoice_address_explanation_text = I18nFormField(
|
||||||
|
label=_("Invoice address explanation"),
|
||||||
|
required=False,
|
||||||
|
widget=I18nTextarea,
|
||||||
|
widget_kwargs={'attrs': {'rows': '2'}},
|
||||||
|
help_text=_("This text will be shown above the invoice address form during checkout.")
|
||||||
|
)
|
||||||
invoice_numbers_consecutive = forms.BooleanField(
|
invoice_numbers_consecutive = forms.BooleanField(
|
||||||
label=_("Generate invoices with consecutive numbers"),
|
label=_("Generate invoices with consecutive numbers"),
|
||||||
help_text=_("If deactivated, the order code will be used in the invoice number."),
|
help_text=_("If deactivated, the order code will be used in the invoice number."),
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
{% bootstrap_field form.invoice_additional_text layout="control" %}
|
{% bootstrap_field form.invoice_additional_text layout="control" %}
|
||||||
{% bootstrap_field form.invoice_footer_text layout="control" %}
|
{% bootstrap_field form.invoice_footer_text layout="control" %}
|
||||||
{% bootstrap_field form.invoice_logo_image layout="control" %}
|
{% bootstrap_field form.invoice_logo_image layout="control" %}
|
||||||
|
{% bootstrap_field form.invoice_address_explanation_text layout="control" %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div class="form-group submit-group">
|
<div class="form-group submit-group">
|
||||||
<button type="submit" class="btn btn-default btn-lg" name="preview" value="preview" formtarget="_blank">
|
<button type="submit" class="btn btn-default btn-lg" name="preview" value="preview" formtarget="_blank">
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{% extends "pretixpresale/event/checkout_base.html" %}
|
{% extends "pretixpresale/event/checkout_base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load rich_text %}
|
||||||
{% block inner %}
|
{% block inner %}
|
||||||
<p>{% trans "Before we continue, we need you to answer some questions." %}</p>
|
<p>{% trans "Before we continue, we need you to answer some questions." %}</p>
|
||||||
<p class="required-legend">
|
<p class="required-legend">
|
||||||
@@ -40,6 +41,11 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<div id="invoice">
|
<div id="invoice">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
{% if event.settings.invoice_address_explanation_text %}
|
||||||
|
<div>
|
||||||
|
{{ event.settings.invoice_address_explanation_text|rich_text }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% bootstrap_form invoice_form layout="horizontal" %}
|
{% bootstrap_form invoice_form layout="horizontal" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{% extends "pretixpresale/event/base.html" %}
|
{% extends "pretixpresale/event/base.html" %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load bootstrap3 %}
|
{% load bootstrap3 %}
|
||||||
|
{% load rich_text %}
|
||||||
{% block title %}{% trans "Modify order" %}{% endblock %}
|
{% block title %}{% trans "Modify order" %}{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h2>
|
<h2>
|
||||||
@@ -37,6 +38,11 @@
|
|||||||
</summary>
|
</summary>
|
||||||
<div id="invoice" class="panel-collapse">
|
<div id="invoice" class="panel-collapse">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
{% if event.settings.invoice_address_explanation_text %}
|
||||||
|
<div>
|
||||||
|
{{ event.settings.invoice_address_explanation_text|rich_text }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% bootstrap_form invoice_form layout="horizontal" %}
|
{% bootstrap_form invoice_form layout="horizontal" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user