Commit 377bb6f4 authored by Kevin Gutiérrez's avatar Kevin Gutiérrez
Browse files

Fix copies

parent 120ad6b6
{% extends "wagtailadmin/base.html" %} {% extends "wagtailadmin/base.html" %}
{% load i18n %} {% load i18n %}
{% block titletag %}{% trans "Add an image" %}{% endblock %} {% block titletag %}{% trans "Add a video" %}{% endblock %}
{% block extra_js %} {% block extra_js %}
{{ block.super }} {{ block.super }}
......
{% extends "wagtailadmin/base.html" %} {% extends "wagtailadmin/base.html" %}
{% load wagtailvideos_tags %} {% load wagtailvideos_tags %}
{% load i18n %} {% load i18n %}
{% block titletag %}{% trans "Delete image" %}{% endblock %} {% block titletag %}{% trans "Delete video" %}{% endblock %}
{% block content %} {% block content %}
{% trans "Delete image" as del_str %} {% trans "Delete video" as del_str %}
{% include "wagtailadmin/shared/header.html" with title=del_str icon="image" %} {% include "wagtailadmin/shared/header.html" with title=del_str icon="media" %}
<div class="row row-flush nice-padding"> <div class="row row-flush nice-padding">
<div class="col6"> <div class="col6">
......
...@@ -26,8 +26,8 @@ permission_checker = PermissionPolicyChecker(permission_policy) ...@@ -26,8 +26,8 @@ permission_checker = PermissionPolicyChecker(permission_policy)
def get_video_json(video): def get_video_json(video):
""" """
helper function: given an image, return the json to pass back to the helper function: given a video, return the json to pass back to the
image chooser panel video chooser panel
""" """
return { return {
......
...@@ -114,7 +114,7 @@ def edit(request, video_id, callback=None): ...@@ -114,7 +114,7 @@ def edit(request, video_id, callback=None):
if form.is_valid(): if form.is_valid():
form.save() form.save()
# Reindex the image to make sure all tags are indexed # Reindex the video to make sure all tags are indexed
for backend in get_search_backends(): for backend in get_search_backends():
backend.add(video) backend.add(video)
......
...@@ -100,7 +100,7 @@ def edit(request, video_id): ...@@ -100,7 +100,7 @@ def edit(request, video_id):
video = form.save() video = form.save()
video.save() video.save()
# Reindex the image to make sure all tags are indexed # Reindex the video to make sure all tags are indexed
for backend in get_search_backends(): for backend in get_search_backends():
backend.add(video) backend.add(video)
...@@ -111,7 +111,7 @@ def edit(request, video_id): ...@@ -111,7 +111,7 @@ def edit(request, video_id):
form = VideoForm(instance=video) form = VideoForm(instance=video)
if not video._meta.get_field('file').storage.exists(video.file.name): if not video._meta.get_field('file').storage.exists(video.file.name):
# Give error if image file doesn't exist # Give error if video file doesn't exist
messages.error(request, _( messages.error(request, _(
"The source video file could not be found. Please change the source or delete the video." "The source video file could not be found. Please change the source or delete the video."
).format(video.title), buttons=[ ).format(video.title), buttons=[
......
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