{% import "adminsite/_icons.html" as icons %} {% for table in inlines %}

{{ table.label }}

{{ table.rows|length }}
{% for header in table.headers %} {% endfor %} {% if table.inline.can_delete %}{% endif %} {% for item in table.rows %} {% set index = loop.index0 %} {% for row in item.cells %} {% endfor %} {% if table.inline.can_delete %} {% endif %} {% endfor %}
{{ header }}{{ _('Remove') }}
{% if loop.first %} {% endif %} {% if row.readonly %} {{ row.display or "—" }} {% else %} {% set note_id = table.name ~ "-" ~ index ~ "-" ~ row.path|replace(".", "-") ~ "-note" %} {% set field_attrs %}aria-label="{{ row.label }}"{% if row.error %} aria-invalid="true" aria-describedby="{{ note_id }}"{% endif %}{% endset %} {% include ["adminsite/widgets/" ~ row.widget ~ ".html", "adminsite/widgets/input.html"] %} {% endif %} {% if row.error %}

{{ icons.icon("alert", 14) }}{{ row.error }}

{% endif %}
{% if item.key %} {#- A real box, so the removal is sent with the form; it looks like a button and dims the row it will remove. -#} {% else %} {% endif %}
{#- The row "add a row" copies. It sits in a template, so its inputs are never submitted until they are copied into the table. -#}
{% endfor %}