Recognise title and template attributes on item_forms signal (#3492)

This commit is contained in:
Kian Cross
2023-07-24 16:35:39 +01:00
committed by GitHub
parent 63ae0724cf
commit 65ecdc184e
3 changed files with 37 additions and 4 deletions

View File

@@ -186,8 +186,12 @@
{% bootstrap_field form.media_type layout="control" %}
{% endif %}
{% for f in plugin_forms %}
{% if f.is_layouts %}
{% bootstrap_form f layout="control" %}
{% if f.is_layouts and not f.title %}
{% if f.template %}
{% include f.template with form=f %}
{% else %}
{% bootstrap_form f layout="control" %}
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
@@ -256,11 +260,27 @@
{% endif %}
{% bootstrap_field form.show_quota_left layout="control" %}
{% for f in plugin_forms %}
{% if not f.is_layouts %}
{% bootstrap_form f layout="control" %}
{% if not f.is_layouts and not f.title %}
{% if f.template %}
{% include f.template with form=f %}
{% else %}
{% bootstrap_form f layout="control" %}
{% endif %}
{% endif %}
{% endfor %}
</fieldset>
{% for f in plugin_forms %}
{% if not f.is_layouts and f.title %}
<fieldset>
<legend>{{ f.title }}</legend>
{% if f.template %}
{% include f.template with form=f %}
{% else %}
{% bootstrap_form f layout="control" %}
{% endif %}
</fieldset>
{% endif %}
{% endfor %}
</div>
<div class="form-group submit-group">
<button type="submit" class="btn btn-primary btn-save">