mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Extend generic base template for groups create template
This allows us to reuse the header parts, including breadcrumbs.
This commit is contained in:
parent
7e7fc56d6c
commit
0709c31933
@ -1,7 +1,5 @@
|
|||||||
{% extends "wagtailadmin/base.html" %}
|
{% extends "wagtailadmin/generic/base.html" %}
|
||||||
{% load wagtailusers_tags wagtailimages_tags wagtailadmin_tags i18n %}
|
{% load wagtailusers_tags i18n %}
|
||||||
|
|
||||||
{% block titletag %}{% trans "Add group" %}{% endblock %}
|
|
||||||
|
|
||||||
{% block extra_css %}
|
{% block extra_css %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
@ -9,12 +7,7 @@
|
|||||||
{{ form_media.css }}
|
{{ form_media.css }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block main_content %}
|
||||||
|
|
||||||
{% trans "Add group" as add_group_str %}
|
|
||||||
{% include "wagtailadmin/shared/header.html" with title=add_group_str icon="group" only %}
|
|
||||||
|
|
||||||
<div class="nice-padding">
|
|
||||||
<form action="{% url 'wagtailusers_groups:add' %}" method="POST" novalidate>
|
<form action="{% url 'wagtailusers_groups:add' %}" method="POST" novalidate>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
@ -33,10 +26,9 @@
|
|||||||
{{ panel.as_admin_panel }}
|
{{ panel.as_admin_panel }}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li><input type="submit" value='{% trans "Add group" %}' class="button" /></li>
|
<li><input type="submit" value="{% trans 'Add group' %}" class="button" /></li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block extra_js %}
|
{% block extra_js %}
|
||||||
|
@ -76,6 +76,9 @@ class CreateView(PermissionPanelFormsMixin, generic.CreateView):
|
|||||||
page_title = _("Add group")
|
page_title = _("Add group")
|
||||||
success_message = _("Group '%(object)s' created.")
|
success_message = _("Group '%(object)s' created.")
|
||||||
|
|
||||||
|
def get_page_subtitle(self):
|
||||||
|
return ""
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
Handle POST requests: instantiate a form instance with the passed
|
Handle POST requests: instantiate a form instance with the passed
|
||||||
|
Loading…
Reference in New Issue
Block a user