mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Export form: Add note on multisheet exporters
This commit is contained in:
@@ -25,6 +25,17 @@
|
||||
<fieldset>
|
||||
<legend>{% trans "Export options" %}</legend>
|
||||
{% bootstrap_form exporter.form layout='control' %}
|
||||
|
||||
{% if "_format" in exporter.form.fields and exporter.multisheet_warning %}
|
||||
<div data-display-dependency="#id_{{ exporter.form.prefix }}-_format" data-display-dependency-value="xlsx">
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
Your generated Excel file will have <strong>multiple sheets</strong>. Some data you are
|
||||
looking for might not be on the first sheet.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
{% if schedule_form %}
|
||||
{% include "pretixcontrol/orders/fragment_export_schedule_form.html" %}
|
||||
|
||||
@@ -26,6 +26,17 @@
|
||||
<fieldset>
|
||||
<legend>{% trans "Export options" %}</legend>
|
||||
{% bootstrap_form exporter.form layout='control' %}
|
||||
|
||||
{% if "_format" in exporter.form.fields and exporter.multisheet_warning %}
|
||||
<div data-display-dependency="#id_{{ exporter.form.prefix }}-_format" data-display-dependency-value="xlsx">
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
Your generated Excel file will have <strong>multiple sheets</strong>. Some data you are
|
||||
looking for might not be on the first sheet.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
{% if schedule_form %}
|
||||
{% include "pretixcontrol/orders/fragment_export_schedule_form.html" %}
|
||||
|
||||
@@ -74,6 +74,7 @@ from i18nfield.strings import LazyI18nString
|
||||
from pretix.base.channels import get_all_sales_channels
|
||||
from pretix.base.decimal import round_decimal
|
||||
from pretix.base.email import get_email_context
|
||||
from pretix.base.exporter import MultiSheetListExporter
|
||||
from pretix.base.i18n import language
|
||||
from pretix.base.models import (
|
||||
CachedCombinedTicket, CachedFile, CachedTicket, Checkin, Invoice,
|
||||
@@ -2479,6 +2480,7 @@ class ExportMixin:
|
||||
prefix=ex.identifier,
|
||||
initial=initial
|
||||
)
|
||||
ex.multisheet_warning = isinstance(ex, MultiSheetListExporter) and len(ex.sheets) > 1
|
||||
ex.form.fields = ex.export_form_fields
|
||||
return ex
|
||||
|
||||
|
||||
@@ -72,7 +72,9 @@ from pretix.api.models import ApiCall, WebHook
|
||||
from pretix.api.webhooks import manually_retry_all_calls
|
||||
from pretix.base.auth import get_auth_backends
|
||||
from pretix.base.channels import get_all_sales_channels
|
||||
from pretix.base.exporter import OrganizerLevelExportMixin
|
||||
from pretix.base.exporter import (
|
||||
MultiSheetListExporter, OrganizerLevelExportMixin,
|
||||
)
|
||||
from pretix.base.i18n import language
|
||||
from pretix.base.models import (
|
||||
CachedFile, Customer, Device, Gate, GiftCard, Invoice, LogEntry,
|
||||
@@ -1665,6 +1667,7 @@ class ExportMixin:
|
||||
prefix=ex.identifier,
|
||||
initial=initial
|
||||
)
|
||||
ex.multisheet_warning = isinstance(ex, MultiSheetListExporter) and len(ex.sheets) > 1
|
||||
ex.form.fields = ex.export_form_fields
|
||||
if not isinstance(ex, OrganizerLevelExportMixin):
|
||||
ex.form.fields.update([
|
||||
|
||||
Reference in New Issue
Block a user