From eae2d048848e0e847941d59ea0685dbd1552cb79 Mon Sep 17 00:00:00 2001 From: Mira Weller Date: Fri, 8 Mar 2024 19:34:54 +0100 Subject: [PATCH] Use exclusive checkboxes for addon items with max_count == 1 and !multi_allowed --- .../templates/pretixpresale/event/fragment_addon_choice.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html b/src/pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html index 25282f069..e527d8519 100644 --- a/src/pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html +++ b/src/pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html @@ -333,6 +333,9 @@ {% elif item.initial %} checked="checked" {% endif %} + {% if c.max_count == 1 %} + data-exclusive-prefix="cp_{{ form.pos.pk }}_item_" + {% endif %} name="cp_{{ form.pos.pk }}_item_{{ item.id }}" id="cp_{{ form.pos.pk }}_item_{{ item.id }}" aria-label="{% blocktrans with item=item.name %}Add {{ item }} to cart{% endblocktrans %}"