1
Fork 0

Add snippetChooser URL as removed from Wagtail

This commit is contained in:
Parbhat Puri 2020-11-10 16:36:59 +05:30
parent 3fb799b51e
commit ba0246a2ec

View file

@ -68,10 +68,12 @@ def editor_js():
return format_html( return format_html(
""" """
<script> <script>
window.chooserUrls.snippetLinkModelChooser = '{0}'; window.chooserUrls.snippetChooser = '{0}';
window.chooserUrls.snippetEmbedModelChooser = '{1}'; window.chooserUrls.snippetLinkModelChooser = '{1}';
window.chooserUrls.snippetEmbedModelChooser = '{2}';
</script> </script>
""", """,
reverse('wagtailsnippets:choose_generic'),
reverse("wagtaildraftailsnippet:choose-snippet-link-model"), reverse("wagtaildraftailsnippet:choose-snippet-link-model"),
reverse("wagtaildraftailsnippet:choose-snippet-embed-model"), reverse("wagtaildraftailsnippet:choose-snippet-embed-model"),
) )