{% from "admin/macros/widgets.html" import widget %} {% from "admin/macros/cells.html" import cell_text %} {% macro inline_row(group, row) %} {% if group.inline.layout == 'tabular' %}{% else %}
{% endif %} {% for spec in row.specs %} {% if group.inline.layout == 'tabular' %}{% endif %} {% if row.readonly or spec.readonly %}
{{ spec.label }}
{% if row.cells.get(spec.name) %}{{ cell_text(row.cells[spec.name]) }}{% else %}—{% endif %}
{% else %} {{ widget(spec, row['values'].get(spec.name, ''), row.errors.get(spec.name), row.choices.get(spec.name, []), false, prefix=row.prefix, autocomplete_url=row.autocomplete_urls.get(spec.name, ''), html_required=false) }} {% endif %} {% if group.inline.layout == 'tabular' %}{% endif %} {% endfor %} {% if group.inline.layout == 'tabular' %}{% endif %} {% if row.errors.get('__all__') %}
{{ row.errors['__all__'] | join('; ') }}
{% endif %} {% if row.can_delete %} {% elif not row.obj and group.can_add %} {% endif %} {% if row.change_url %}{{ row.change_label }}{% endif %} {% if group.inline.layout == 'tabular' %}{% else %}
{% endif %} {% endmacro %} {% for group in inline_formsets %}

{{ group.inline.plural_name }}

{% for error in group.errors %}
{{ error }}
{% endfor %} {% if group.inline.layout == 'tabular' %}
{% else %}
{% endif %} {% for row in group.rows %}{{ inline_row(group, row) }}{% endfor %} {% if group.inline.layout == 'tabular' %}
{% else %}
{% endif %} {% if group.can_add %} {% endif %}
{% endfor %}