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 7a91cb810..ba2dc5e6a 100644 --- a/src/pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html +++ b/src/pretix/presale/templates/pretixpresale/event/fragment_addon_choice.html @@ -6,7 +6,7 @@ {% load eventsignal %} {% load rich_text %} {% for c in form.categories %} -
+ {{ c.category.name }} {% if c.category.description %} {{ c.category.description|rich_text }} @@ -193,7 +193,6 @@ {% endif %} id="cp_{{ form.pos.pk }}_variation_{{ item.id }}_{{ var.id }}" name="cp_{{ form.pos.pk }}_variation_{{ item.id }}_{{ var.id }}" - data-exclusive-prefix="cp_{{ form.pos.pk }}_" aria-label="{% blocktrans with item=item.name var=var %}Add {{ item }}, {{ var }} to cart{% endblocktrans %}"> {% trans "Select" context "checkbox" %} @@ -333,9 +332,6 @@ {% elif item.initial %} checked="checked" {% endif %} - {% if c.max_count == 1 %} - data-exclusive-prefix="cp_{{ form.pos.pk }}_" - {% 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 %}" diff --git a/src/pretix/static/pretixpresale/js/ui/main.js b/src/pretix/static/pretixpresale/js/ui/main.js index d3db564c9..8a480dad3 100644 --- a/src/pretix/static/pretixpresale/js/ui/main.js +++ b/src/pretix/static/pretixpresale/js/ui/main.js @@ -150,9 +150,9 @@ var form_handlers = function (el) { }); - el.find("fieldset:has(input[data-exclusive-prefix])").on('change', function (e) { + el.find("fieldset[data-addon-exclusive]").on('change', function (e) { if (e.target.checked) { - $(".input[type=checkbox][name^=" + e.target.getAttribute("data-exclusive-prefix") + "]:checked", this).not(e.target).prop('checked', false).trigger('change'); + $(".availability-box input:checked", this).not(e.target).prop('checked', false).trigger('change'); } });