mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Use ModalPageFurnitureMixin to pass icon / page title
This commit is contained in:
parent
e124a08e8d
commit
7ed50d5364
@ -1,7 +1,6 @@
|
||||
{% load wagtailimages_tags wagtailadmin_tags %}
|
||||
{% load i18n %}
|
||||
{% trans "Choose an image" as choose_str %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=choose_str merged=1 icon="image" %}
|
||||
{% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle merged=1 icon=header_icon %}
|
||||
|
||||
{{ uploadform.media.js }}
|
||||
{{ uploadform.media.css }}
|
||||
|
@ -14,7 +14,10 @@ from wagtail import hooks
|
||||
from wagtail.admin.auth import PermissionPolicyChecker
|
||||
from wagtail.admin.modal_workflow import render_modal_workflow
|
||||
from wagtail.admin.models import popular_tags_for_model
|
||||
from wagtail.admin.views.generic.chooser import ChosenResponseMixin
|
||||
from wagtail.admin.views.generic.chooser import (
|
||||
ChosenResponseMixin,
|
||||
ModalPageFurnitureMixin,
|
||||
)
|
||||
from wagtail.admin.views.generic.permissions import PermissionCheckedMixin
|
||||
from wagtail.images import get_image_model
|
||||
from wagtail.images.formats import get_image_format
|
||||
@ -65,7 +68,9 @@ class ImageFilterForm(forms.Form):
|
||||
)
|
||||
|
||||
|
||||
class BaseChooseView(ContextMixin, View):
|
||||
class BaseChooseView(ModalPageFurnitureMixin, ContextMixin, View):
|
||||
icon = "image"
|
||||
page_title = _("Choose an image")
|
||||
permission_policy = permission_policy
|
||||
|
||||
def get_object_list(self):
|
||||
|
Loading…
Reference in New Issue
Block a user