Public event filter: Make "all" option clearer (Z#23169843) (#4585)

* Public event filter: Make "all" option clearer

* Fix widget tests

* Update src/tests/presale/test_widget.py

Co-authored-by: Richard Schreiber <schreiber@rami.io>

---------

Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
Raphael Michel
2024-10-29 17:31:51 +01:00
committed by GitHub
parent f9502a3212
commit 81d7045b31
2 changed files with 5 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
#
from django import forms
from django.conf import settings
from django.utils.translation import pgettext
from i18nfield.strings import LazyI18nString
from pretix.base.models import EventMetaValue, SubEventMetaValue
@@ -66,7 +67,7 @@ def meta_filtersets(organizer, event=None):
).values_list("value", flat=True).distinct())
choices = [(k, k) for k in sorted(existing_values)]
choices.insert(0, ("", ""))
choices.insert(0, ("", "-- %s --" % pgettext("filter_empty", "all")))
if len(choices) > 1:
fields[f"attr[{prop.name}]"] = {
"label": str(prop.public_label) or prop.name,