Rename 'fields' block in generic/form.html template to form_content

This was only recently introduced in
08fd30cb65 (not yet released).

We already have a documented 'fields' block in groups and users' create
and edit views for customisation. Using the same name for the overall
form content (other than the actions) would prevent us from making use
of this block for those documented templates.

Rename the block to form_content, so we can override the block while
also defining the documented 'fields' block in groups and users' create
and edit views.
pull/12425/head
Sage Abdullah 2024-10-15 12:38:25 +01:00 zatwierdzone przez Thibaud Colas
rodzic 2f476e10b0
commit 5b79c27dc9
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -32,7 +32,7 @@
>
{% csrf_token %}
{% block fields %}
{% block form_content %}
{% if panel %}
{{ panel.render_form_content }}
{% else %}

Wyświetl plik

@ -1,7 +1,7 @@
{% extends "wagtailadmin/generic/edit.html" %}
{% load i18n wagtailadmin_tags %}
{% block fields %}
{% block form_content %}
<div class="w-grid w-grid-cols-1 sm:w-grid-cols-6 w-gap-8">
<div class="sm:w-col-span-5">
<input type="hidden" value="{{ next }}" name="next">

Wyświetl plik

@ -10,7 +10,7 @@
<script src="{% versioned_static 'wagtailimages/js/focal-point-chooser.js' %}"></script>
{% endblock %}
{% block fields %}
{% block form_content %}
<div class="w-grid w-grid-cols-1 sm:w-grid-cols-2 w-gap-8">
<div>
<input type="hidden" value="{{ next }}" name="next">