{% comment %} Base template for list editor based on formsets (tracklist_editor, playlist_editor). Context: - tag_id: id of parent component - tag: vue component tag (a-playlist-editor, etc.) - related_field: field name that target object - object: related object - formset: formset used to render the list editor - formset_data: formset data {% endcomment %} {% load aircox aircox_admin static i18n %} {% with formset.form.base_fields as fields %} {% block outer %}
{{ formset.non_form_errors }} <{{ tag|default:"a-form-set" }} {% block tag-attrs %} :form-data="{{ formset_data|json }}" :labels="window.aircox.labels" :init-data="{% formset_inline_data formset=formset %}" :columns="[{% for n, f in fields.items %}{% if not f.widget.is_hidden %}'{{ n }}',{% endif %}{% endfor %} ]" settings-url="{% url "api:user-settings" %}" data-prefix="{{ formset.prefix }}-" {% endblock %}> {% block inner %} {% for name, field in fields.items %} {% if not field.widget.is_hidden and not field.is_readonly %} {% endif %} {% endfor %} {% endblock %}
{% endblock %} {% endwith %}