From 34b656989f9575a8194019741a6380d334580087 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 4 Aug 2025 17:15:48 +0200 Subject: [PATCH] Fix select2 with allowClear and no placeholder (Z#23203145) --- src/pretix/static/pretixcontrol/js/ui/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/static/pretixcontrol/js/ui/main.js b/src/pretix/static/pretixcontrol/js/ui/main.js index 42b705988..3f371694e 100644 --- a/src/pretix/static/pretixcontrol/js/ui/main.js +++ b/src/pretix/static/pretixcontrol/js/ui/main.js @@ -533,7 +533,7 @@ var form_handlers = function (el) { allowClear: !$s.prop("required"), width: '100%', language: $("body").attr("data-select2-locale"), - placeholder: $(this).attr("data-placeholder"), + placeholder: $(this).attr("data-placeholder") || "", ajax: { url: $(this).attr('data-select2-url'), data: function (params) { @@ -594,7 +594,7 @@ var form_handlers = function (el) { } } }, - placeholder: $(this).attr("data-placeholder"), + placeholder: $(this).attr("data-placeholder") | "", templateResult: function (res) { if (!res.id) { return res.text;