Commit 2fc9a71d authored by Kevin Gutiérrez's avatar Kevin Gutiérrez Committed by Kevin Gutiérrez
Browse files

Fix get_chooser_js_data removal from wagtail images

Fix #85
parent 31bf0a52
......@@ -4,10 +4,10 @@ import wagtail
from django.core.paginator import Paginator
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.utils.translation import gettext as _
from wagtail.admin.forms.search import SearchForm
from wagtail.admin.modal_workflow import render_modal_workflow
from wagtail.core.models import Collection
from wagtail.images.views.chooser import get_chooser_js_data
from wagtail.search import index as search_index
from wagtailvideos import get_video_model
......@@ -24,6 +24,16 @@ else:
permission_checker = PermissionPolicyChecker(permission_policy)
def get_chooser_js_data():
"""construct context variables needed by the chooser JS"""
return {
'step': 'chooser',
'error_label': _("Server Error"),
'error_message': _("Report this error to your webmaster with the following information:"),
'tag_autocomplete_url': reverse('wagtailadmin_tag_autocomplete'),
}
def get_video_json(video):
"""
helper function: given a video, return the json to pass back to the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment