{#Wrapper for the content block form. Used when adding new content blocks.#} {% load content_block_admin %} {% load admin_urls %}
{% include 'content_blocks/partials/loader.html' with loader_id=content_block.id %}
{% if content_block.can_render %} {% endif %}
{% include 'content_blocks/editor/content_block_form.html' %}
{# Nested fields #} {% for field in content_block.nested_fields.values %}

{{ field.label }}

{% with field.content_blocks.all as field_content_blocks %}
{% for nested_block in field_content_blocks %} {% content_block_form nested_block as content_block_form %} {% include 'content_blocks/editor/content_block_form_wrapper.html' with form=content_block_form content_block=nested_block saved=nested_block.saved nested_num=field_content_blocks|length min_num=field.template_field.min_num %} {% endfor %}
{% new_nested_block_form field as new_nested_form %}
{% for f in new_nested_form %} {{ f }} {% endfor %}
{% endwith %} {% endfor %}