diff --git a/wagtail/admin/edit_handlers.py b/wagtail/admin/edit_handlers.py index 3eaf04b932..edc676421e 100644 --- a/wagtail/admin/edit_handlers.py +++ b/wagtail/admin/edit_handlers.py @@ -474,6 +474,7 @@ class FieldPanel(EditHandler): 'self': self, self.TEMPLATE_VAR: self, 'field': self.bound_field, + 'show_add_comment_button': self.comments_enabled and getattr(self.bound_field.field.widget, 'show_add_comment_button', True), })) field_template = "wagtailadmin/edit_handlers/field_panel_field.html" diff --git a/wagtail/admin/templates/wagtailadmin/edit_handlers/single_field_panel.html b/wagtail/admin/templates/wagtailadmin/edit_handlers/single_field_panel.html index 5a479eb66a..646afa6b88 100644 --- a/wagtail/admin/templates/wagtailadmin/edit_handlers/single_field_panel.html +++ b/wagtail/admin/templates/wagtailadmin/edit_handlers/single_field_panel.html @@ -1,8 +1,18 @@ +{% load i18n %} +
{{ self.heading }}
+ +{% if show_add_comment_button %} +
+ +
+{% endif %} diff --git a/wagtail/admin/templates/wagtailadmin/shared/field.html b/wagtail/admin/templates/wagtailadmin/shared/field.html index 04b28c384e..ab33732a47 100644 --- a/wagtail/admin/templates/wagtailadmin/shared/field.html +++ b/wagtail/admin/templates/wagtailadmin/shared/field.html @@ -21,9 +21,13 @@ {% endfor %}

{% endif %} - - {% if show_add_comment_button %} - - {% endif %} + + {% if show_add_comment_button %} +
+ +
+ {% endif %}