kopia lustrzana https://github.com/wagtail/wagtail
Pass icon to AdminSnippetChooser in SnippetViewSet.register_chooser_widget()
This effectively sets the chooser widget icon to use SnippetViewSet.iconpull/10255/head
rodzic
def6723a21
commit
dd54899ec8
|
@ -72,4 +72,4 @@ class SnippetChooserViewSet(ChooserViewSet):
|
|||
|
||||
@cached_property
|
||||
def widget_class(self):
|
||||
return AdminSnippetChooser(model=self.model)
|
||||
return AdminSnippetChooser(model=self.model, icon=self.icon)
|
||||
|
|
|
@ -13,7 +13,6 @@ from wagtail.telepath import register
|
|||
|
||||
class AdminSnippetChooser(BaseChooser):
|
||||
display_title_key = "string"
|
||||
icon = "snippet"
|
||||
classname = "snippet-chooser"
|
||||
js_constructor = "SnippetChooser"
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue