diff --git a/doc/development/api/ticketoutput.rst b/doc/development/api/ticketoutput.rst index ac1ca64729..64da67956f 100644 --- a/doc/development/api/ticketoutput.rst +++ b/doc/development/api/ticketoutput.rst @@ -72,6 +72,8 @@ The output class .. autoattribute:: download_button_icon + .. autoattribute:: multi_download_button_text + .. autoattribute:: preview_allowed .. autoattribute:: javascript_required diff --git a/src/pretix/base/ticketoutput.py b/src/pretix/base/ticketoutput.py index d2a6ea3955..558e3b494d 100644 --- a/src/pretix/base/ticketoutput.py +++ b/src/pretix/base/ticketoutput.py @@ -162,6 +162,13 @@ class BaseTicketOutput: """ return _('Download ticket') + @property + def multi_download_button_text(self) -> str: + """ + The text on the multi download button in the frontend. + """ + return self.download_button_text + @property def download_button_icon(self) -> str: """ diff --git a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py index a3e4a26715..d7f187c4d9 100644 --- a/src/pretix/plugins/ticketoutputpdf/ticketoutput.py +++ b/src/pretix/plugins/ticketoutputpdf/ticketoutput.py @@ -28,6 +28,7 @@ class PdfTicketOutput(BaseTicketOutput): identifier = 'pdf' verbose_name = _('PDF output') download_button_text = _('PDF') + multi_download_button_text = _('Download tickets (PDF)') def __init__(self, event, override_layout=None, override_background=None): self.override_layout = override_layout diff --git a/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html b/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html index e98cbdc110..cfe56144e1 100644 --- a/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html +++ b/src/pretix/presale/templates/pretixpresale/event/fragment_downloads.html @@ -15,8 +15,8 @@ method="post" data-asynctask data-asynctask-download class="download-btn-form"> {% csrf_token %} {% endif %} diff --git a/src/pretix/presale/views/order.py b/src/pretix/presale/views/order.py index 51c5aeb9f5..54c78e6135 100644 --- a/src/pretix/presale/views/order.py +++ b/src/pretix/presale/views/order.py @@ -161,6 +161,7 @@ class OrderDetails(EventViewMixin, OrderDetailMixin, CartMixin, TicketPageMixin, continue buttons.append({ 'text': provider.download_button_text or 'Download', + 'multi_text': provider.multi_download_button_text or 'Download', 'icon': provider.download_button_icon or 'fa-download', 'identifier': provider.identifier, 'multi': provider.multi_download_enabled,