{% load floppyforms i18n django_backend_tags %} {% with form_opts=formset.form|model_opts %} {% with model_opts=form_opts.model|model_opts order_field=form_opts.model.order_field %}
{{ formset.management_form }} {{ formset.non_form_errors }} {% with form=formset.empty_form %}
{% if not readonly %}
{% endif %}
{% comment %} We are inside a formfield, so we need to undefine the values that are set from the widget, otherwise they will be passed down to the inline forms widgets which will result in an uncorrect rendering. {% endcomment %} {% form form using "floppyforms/layouts/bootstrap.html" with name=None value=None attrs=None %}
{% endwith %} {% for form in formset %}
{% if not readonly %}
{% endif %}
{% form form using "floppyforms/layouts/bootstrap.html" with name=None value=None attrs=None %}
{% endfor %} {% if not formset|length and readonly %} - {% endif %} {% if not readonly %} {% trans "Add new" %} {% endif %}
{% endwith %} {% endwith %}