Skip to content
Snippets Groups Projects
Commit 832217b8 authored by Shrikrishna Singh's avatar Shrikrishna Singh Committed by Fredrik Jonsson
Browse files

Change edit handlers to panels and also path to templates

parent 4be5ba26
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@ from django.forms import Field, Widget
from django.forms.utils import pretty_name
from django.template.loader import render_to_string
from django.urls import reverse
from wagtail.admin.edit_handlers import EditHandler, FieldPanel
from wagtail.admin.edit_handlers import Panel, FieldPanel
from wagtail.core.models import Page
......@@ -37,8 +37,8 @@ class DisplayField(Field):
widget = ReadonlyWidget
class ReadOnlyPanel(EditHandler):
template = 'wagtailadmin/edit_handlers/single_field_panel.html'
class ReadOnlyPanel(Panel):
template = 'wagtailadmin/panels/single_field_panel.html'
field_template = 'wagtailadmin/shared/field.html'
def __init__(self, attr, **kwargs):
......@@ -85,7 +85,7 @@ class ReadOnlyPanel(EditHandler):
class ReadOnlyInlinePanel(ReadOnlyPanel):
template = 'wagtailadmin/edit_handlers/multi_field_panel.html'
template = 'wagtailadmin/panels/multi_field_panel.html'
def get_child_edit_handler(self):
child_edit_handler = ReadOnlyPanel(self.attr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment