From 034da854bc3ae91a7b7196b46357e884b6c04ff2 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Fri, 10 Jun 2022 21:32:43 +0100 Subject: [PATCH] Rename 'icon' context variable to avoid leaking into shared/field.html --- .../admin/templates/wagtailadmin/generic/chooser/chooser.html | 2 +- wagtail/admin/views/generic/chooser.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html b/wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html index ac642165bb..5221904aa5 100644 --- a/wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html +++ b/wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html @@ -1,5 +1,5 @@ {% load i18n wagtailadmin_tags %} -{% include "wagtailadmin/shared/header.html" with title=page_title merged=1 icon=icon %} +{% include "wagtailadmin/shared/header.html" with title=page_title merged=1 icon=header_icon %}
diff --git a/wagtail/admin/views/generic/chooser.py b/wagtail/admin/views/generic/chooser.py index 47b8f8c283..f42250ed7f 100644 --- a/wagtail/admin/views/generic/chooser.py +++ b/wagtail/admin/views/generic/chooser.py @@ -23,7 +23,7 @@ class ModalPageFurnitureMixin(ContextMixin): context = super().get_context_data(**kwargs) context.update( { - "icon": self.icon, + "header_icon": self.icon, "page_title": self.page_title, } )