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',
|
||||
'type': bool,
|
||||
},
|
||||
'invoice_address_explanation_text': {
|
||||
'default': '',
|
||||
'type': LazyI18nString
|
||||
},
|
||||
'invoice_include_free': {
|
||||
'default': 'True',
|
||||
'type': bool,
|
||||
|
||||
@@ -627,6 +627,13 @@ class InvoiceSettingsForm(SettingsForm):
|
||||
"products."),
|
||||
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(
|
||||
label=_("Generate invoices with consecutive numbers"),
|
||||
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_footer_text layout="control" %}
|
||||
{% bootstrap_field form.invoice_logo_image layout="control" %}
|
||||
{% bootstrap_field form.invoice_address_explanation_text layout="control" %}
|
||||
</fieldset>
|
||||
<div class="form-group submit-group">
|
||||
<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" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load rich_text %}
|
||||
{% block inner %}
|
||||
<p>{% trans "Before we continue, we need you to answer some questions." %}</p>
|
||||
<p class="required-legend">
|
||||
@@ -40,6 +41,11 @@
|
||||
</summary>
|
||||
<div id="invoice">
|
||||
<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" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends "pretixpresale/event/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load rich_text %}
|
||||
{% block title %}{% trans "Modify order" %}{% endblock %}
|
||||
{% block content %}
|
||||
<h2>
|
||||
@@ -37,6 +38,11 @@
|
||||
</summary>
|
||||
<div id="invoice" class="panel-collapse">
|
||||
<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" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user