From 0f951dcf029d4af284467543a3afdf5bf6581a20 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 23 Apr 2024 11:16:38 +0100 Subject: switched to Django --- templates/w3/table_inline_formset.html | 57 ++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 templates/w3/table_inline_formset.html (limited to 'templates/w3/table_inline_formset.html') diff --git a/templates/w3/table_inline_formset.html b/templates/w3/table_inline_formset.html new file mode 100644 index 0000000..a4b951d --- /dev/null +++ b/templates/w3/table_inline_formset.html @@ -0,0 +1,57 @@ +{% load crispy_forms_tags %} +{% load crispy_forms_utils %} +{% load crispy_forms_field %} + +{% specialspaceless %} +{% if formset_tag %} +
+{% endif %} + {% if formset_method|lower == 'post' and not disable_csrf %} + {% csrf_token %} + {% endif %} + +
+ {{ formset.management_form|crispy }} +
+ + + + {% if formset.readonly and not formset.queryset.exists %} + {% else %} + + {% for field in formset.forms.0 %} + {% if field.label and not field.is_hidden %} + + {{ field.label }}{% if field.field.required and not field|is_checkbox %}*{% endif %} + + {% endif %} + {% endfor %} + + {% endif %} + + + + + {% for field in formset.empty_form %} + {% include 'w3/field.html' with tag="td" form_show_labels=False %} + {% endfor %} + + + {% for form in formset %} + {% if form_show_errors and not form.is_extra %} + {% include "w3/errors.html" %} + {% endif %} + + + {% for field in form %} + {% include 'w3/field.html' with tag="td" form_show_labels=False %} + {% endfor %} + + {% endfor %} + + + + {% include "w3/inputs.html" %} + +{% if formset_tag %}{% endif %} +{% endspecialspaceless %} -- cgit v1.2.3