diff --git a/wagtail/users/templates/wagtailusers/groups/create.html b/wagtail/users/templates/wagtailusers/groups/create.html index 7637df8491..dd5dd0b97a 100644 --- a/wagtail/users/templates/wagtailusers/groups/create.html +++ b/wagtail/users/templates/wagtailusers/groups/create.html @@ -1,26 +1,28 @@ {% extends "wagtailadmin/generic/create.html" %} {% load wagtailusers_tags i18n wagtailadmin_tags %} -{% block main_content %} -
- {% csrf_token %} +{% block form_content %} + {% block fields %} + {% comment %} + This block is not documented, but developers might assume its existence + based on the docs for custom user forms. + {% endcomment %} + + {% panel id="name" heading=form.name.label id_for_label=form.name.id_for_label is_required=True %} + {% formattedfield field=form.name show_label=False %} + {% endpanel %} + +
+ {# This block is documented in the docs for customizing group views #} + {% block extra_fields %}{% endblock extra_fields %} + + {% format_permissions permission_bound_field=form.permissions %} - - +
+ {% endblock %} {% endblock %} {% block extra_js %} diff --git a/wagtail/users/templates/wagtailusers/groups/edit.html b/wagtail/users/templates/wagtailusers/groups/edit.html index 91cddcc147..6126d97161 100644 --- a/wagtail/users/templates/wagtailusers/groups/edit.html +++ b/wagtail/users/templates/wagtailusers/groups/edit.html @@ -1,40 +1,2 @@ -{% extends "wagtailadmin/generic/edit.html" %} -{% load wagtailusers_tags wagtailadmin_tags i18n %} - -{% block main_content %} -
- {% csrf_token %} - -
- {% block fields %} - {% panel id="name" heading=form.name.label id_for_label=form.name.id_for_label is_required=True %} - {% formattedfield field=form.name show_label=False %} - {% endpanel %} - {% block extra_fields %}{% endblock extra_fields %} - {% endblock fields %} - -
- {% format_permissions permission_bound_field=form.permissions %} -
- - {% for panel in permission_panels %} -
- {{ panel.as_admin_panel }} -
- {% endfor %} -
- - - {% if perms.auth.delete_group %} - {% trans "Delete group" %} - {% endif %} -
-
- -
-{% endblock %} - -{% block extra_js %} - {{ block.super }} - {% include "wagtailusers/groups/includes/group_form_js.html" %} -{% endblock %} +{% extends "wagtailusers/groups/create.html" %} +{# The built-in templates are now identical. #}