From 1192e474c51eb968709e9fd42c90ec4a9e25ee7b Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 20 Feb 2018 10:20:24 +0100 Subject: [PATCH] Prevent duplicate All/None links --- src/pretix/static/pretixcontrol/js/ui/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pretix/static/pretixcontrol/js/ui/main.js b/src/pretix/static/pretixcontrol/js/ui/main.js index 7f405b807f..500e7b41cd 100644 --- a/src/pretix/static/pretixcontrol/js/ui/main.js +++ b/src/pretix/static/pretixcontrol/js/ui/main.js @@ -234,7 +234,10 @@ var form_handlers = function (el) { dependency.closest('.form-group').find('input[name=' + dependency.attr("name") + ']').on("dp.change", update); }); - el.find(".scrolling-multiple-choice").each(function () { + el.find("div.scrolling-multiple-choice").each(function () { + if ($(this).find(".choice-options-all").length > 0) { + return; + } var $small = $(""); var $a_all = $("").addClass("choice-options-all").attr("href", "#").text(gettext("All")); var $a_none = $("").addClass("choice-options-none").attr("href", "#").text(gettext("None"));