From 18159a1b77fefb45dda3b4984bf2c83d7a2b4013 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 26 Oct 2023 10:41:29 +0200 Subject: [PATCH] Webhooks: Use better event selection widget --- src/pretix/control/forms/organizer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/pretix/control/forms/organizer.py b/src/pretix/control/forms/organizer.py index 1b4b224784..befad313a4 100644 --- a/src/pretix/control/forms/organizer.py +++ b/src/pretix/control/forms/organizer.py @@ -46,9 +46,7 @@ from django.utils.crypto import get_random_string from django.utils.html import conditional_escape from django.utils.safestring import mark_safe from django.utils.translation import gettext_lazy as _, pgettext_lazy -from django_scopes.forms import ( - SafeModelChoiceField, SafeModelMultipleChoiceField, -) +from django_scopes.forms import SafeModelChoiceField from i18nfield.forms import ( I18nFormField, I18nFormSetMixin, I18nTextarea, I18nTextInput, ) @@ -611,11 +609,12 @@ class WebHookForm(forms.ModelForm): fields = ['target_url', 'enabled', 'all_events', 'limit_events', 'comment'] widgets = { 'limit_events': forms.CheckboxSelectMultiple(attrs={ - 'data-inverse-dependency': '#id_all_events' + 'data-inverse-dependency': '#id_all_events', + 'class': 'scrolling-multiple-choice scrolling-multiple-choice-large', }), } field_classes = { - 'limit_events': SafeModelMultipleChoiceField + 'limit_events': SafeEventMultipleChoiceField }