diff --git a/src/pretix/static/pretixcontrol/js/ui/orderchange.js b/src/pretix/static/pretixcontrol/js/ui/orderchange.js index 952ec58ea..0c307be34 100644 --- a/src/pretix/static/pretixcontrol/js/ui/orderchange.js +++ b/src/pretix/static/pretixcontrol/js/ui/orderchange.js @@ -1,6 +1,5 @@ /*global $, gettext*/ $(function () { - // Question view if (!$(".form-order-change").length) { return; } @@ -57,51 +56,4 @@ $(function () { } }); }); - $('[data-model-select2=seat]').each(function () { - var $s = $(this); - $s.select2({ - theme: "bootstrap", - delay: 100, - allowClear: !$s.prop("required"), - width: '100%', - language: $("body").attr("data-select2-locale"), - placeholder: $(this).attr("data-placeholder"), - ajax: { - url: function() { - var se = $(this).closest(".form-order-change, .form-horizontal").attr("data-subevent"); - var url = $(this).attr('data-select2-url'); - var changed = $(this).closest(".form-order-change, .form-horizontal").find("[id$=subevent]").val(); - if (changed) { - return url + '?subevent=' + changed; - } else if (se) { - return url + '?subevent=' + se; - } else { - return url; - } - }, - data: function (params) { - return { - query: params.term, - page: params.page || 1 - } - } - }, - templateResult: function (res) { - if (!res.id) { - return res.text; - } - var $ret = $("").append( - $("").addClass("primary").append($("
").text(res.text).html()) - ); - if (res.event) { - $ret.append( - $("").addClass("secondary").append( - $("").addClass("fa fa-calendar fa-fw") - ).append(" ").append($("
").text(res.event).html()) - ); - } - return $ret; - }, - }); - }); });