Export form: Add note on multisheet exporters

This commit is contained in:
Raphael Michel
2023-11-20 10:18:19 +01:00
parent 3ad2429293
commit f1969e783f
4 changed files with 28 additions and 1 deletions

View File

@@ -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

View File

@@ -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([