#19713: Extend render_form() template tag to support meta fields
Some checks are pending
CI / build (20.x, 3.10) (push) Waiting to run
CI / build (20.x, 3.11) (push) Waiting to run
CI / build (20.x, 3.12) (push) Waiting to run

This commit is contained in:
Jeremy Stretch 2025-08-13 16:12:08 -04:00
parent 72c552dd77
commit 7fad58a8df

View File

@ -1,8 +1,25 @@
{% load form_helpers %}
{# Hidden fields #}
{% for field in form.hidden_fields %}
{{ field }}
{{ field }}
{% endfor %}
{# Normal fields #}
{% for field in form.visible_fields %}
{% if not form.meta_fields or field.name not in form.meta_fields %}
{% render_field field %}
{% endif %}
{% endfor %}
{# Meta fields #}
{% if form.meta_fields %}
<div class="bg-primary-subtle border border-primary rounded-1 pt-3 px-3 mb-3">
{% if form.changelog_message %}
{% render_field form.changelog_message %}
{% endif %}
{% if form.background_job %}
{% render_field form.background_job %}
{% endif %}
</div>
{% endif %}