{% load freeadmin %}
    {% for name, formset in formsets.items %}
    {% if formset.position == position %}
    <tr id="inline_{{ model_name }}_{{ name }}">
        <td colspan="2">
            <table>
                {{ formset.instance.management_form }}
                <tr>
                    <td colspan="2">
                    {{ formset.instance.verbose_name }}
                    <input data-dojo-type="dijit.form.TextBox" type="hidden" name="{{ name }}-__all__" />
                    </td>
                </tr>
                {% for form in formset.instance %}
                <tr>
                    <td colspan="2">
                        <table>
                            {% admin_form form %}
                        </table>
                    </td>
                </tr>
                {% endfor %}
                <tr>
                    <td colspan="2">
                    <a href="javascript:void(0);" onClick="add_formset(this, '{{ model.get_empty_formset_url }}', '{{ formset.instance.prefix|escapejs }}');">{% trans "Add extra" %} {{ formset.instance.verbose_name }}</a>         
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    {% endif %}
    {% endfor %}
