From 4f511f0fd4236b4acf9ee51552e62a2661186e0a Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Mon, 20 Jun 2022 20:09:35 +0100 Subject: [PATCH] Migrate snippet chooser search form to get_filter_form_class to match generic implementation in wagtail.admin.views.generic.chooser --- .../wagtailsnippets/chooser/choose.html | 10 ++- wagtail/snippets/views/chooser.py | 61 +++++++++++++------ 2 files changed, 48 insertions(+), 23 deletions(-) diff --git a/wagtail/snippets/templates/wagtailsnippets/chooser/choose.html b/wagtail/snippets/templates/wagtailsnippets/chooser/choose.html index a33b60a85f..a60d0629ea 100644 --- a/wagtail/snippets/templates/wagtailsnippets/chooser/choose.html +++ b/wagtail/snippets/templates/wagtailsnippets/chooser/choose.html @@ -3,15 +3,19 @@ {% include "wagtailadmin/shared/header.html" with title=choose_str subtitle=model_opts.verbose_name icon="snippet" %}
- {% if is_searchable or locale or locale_options %} + {% if filter_form.fields or locale or locale_options %}