From 8a1a9eb94b35a82f450e23a92c345c5c5fe3c304 Mon Sep 17 00:00:00 2001 From: Erwhann-Rouge Guilhem MAS-PAITRAULT Date: Wed, 11 Oct 2017 12:06:20 +0200 Subject: [PATCH] Added copy form template to override the Wagtail one --- .../templates/modeltranslation_copy.html | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 wagtail_modeltranslation/templates/modeltranslation_copy.html diff --git a/wagtail_modeltranslation/templates/modeltranslation_copy.html b/wagtail_modeltranslation/templates/modeltranslation_copy.html new file mode 100644 index 0000000..6f3a2c6 --- /dev/null +++ b/wagtail_modeltranslation/templates/modeltranslation_copy.html @@ -0,0 +1,36 @@ +{% extends "wagtailadmin/base.html" %} +{% load i18n %} +{% block titletag %}{% blocktrans with title=page.get_admin_display_title %}Copy {{ title }}{% endblocktrans %}{% endblock %} +{% block content %} + {% trans "Copy" as copy_str %} + {% include "wagtailadmin/shared/header.html" with title=copy_str subtitle=page.get_admin_display_title icon="doc-empty-inverse" %} + +
+
+ {% csrf_token %} + +

Wagtail modeltranslation copy

+ +
    + {% include "wagtailadmin/shared/field_as_li.html" with field=form.new_title %} + {% include "wagtailadmin/shared/field_as_li.html" with field=form.new_slug %} + {% include "wagtailadmin/shared/field_as_li.html" with field=form.new_parent_page %} + + {% if form.copy_subpages %} + {% include "wagtailadmin/shared/field_as_li.html" with field=form.copy_subpages %} + {% endif %} + + {% if form.publish_copies %} + {% include "wagtailadmin/shared/field_as_li.html" with field=form.publish_copies %} + {% endif %} +
+ + +
+
+{% endblock %} + +{% block extra_js %} + {{ block.super }} + {% include "wagtailadmin/pages/_editor_js.html" %} +{% endblock %}