File tree Expand file tree Collapse file tree 5 files changed +40
-5
lines changed
src/unfold/templates/unfold_crispy Expand file tree Collapse file tree 5 files changed +40
-5
lines changed Original file line number Diff line number Diff line change 1+ {% if formset.non_form_errors %}
2+ {% include "unfold/helpers/messages/error.html" with errors=formset.non_form_errors %}
3+ {% endif %}
Original file line number Diff line number Diff line change 33{% if field.is_hidden %}
44 {{ field }}
55{% else %}
6- < {% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" class="group {% if tag == "td" %}align-top border-t border-base-200 font-normal gap-4 min-w-0 overflow-hidden px-3 py-3 text-left dark:border-base-800 dark:before:text-font-important-dark{% endif%} {% if field.errors %}errors{% endif %} {% if field_class %} {{ field_class }}{% endif %} {% if field|is_checkbox and tag == "td" %}flex flex-row gap-2 h-[38px] items-center{% else %}{% if 'form-horizontal' in form_class %} row{% endif %}{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
6+ < {% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" class="group {% if tag == "td" %}align-top border-t border-base-200 font-normal gap-4 min-w-0 overflow-hidden px-3 py-3 text-left dark:border-base-800 dark:before:text-font-important-dark{% endif%} {% if field.errors %}errors{% endif %} {% if field_class %} {{ field_class }}{% endif %} {% if field|is_checkbox and tag == "td" %}flex flex-row gap-2 items-center{% else %}{% if 'form-horizontal' in form_class %} row{% endif %}{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
77 {% if field.label and not field|is_checkbox and form_show_labels %}
88 < label {% if field.id_for_label %}for ="{{ field.id_for_label }} "{% endif %} class ="block font-semibold mb-2 text-font-important-light text-sm dark:text-font-important-dark {% if label_class %} {{ label_class }}{% endif %} ">
99 {{ field.label }}{% if field.field.required %} < span class ="asteriskField "> *</ span > {% endif %}
Original file line number Diff line number Diff line change 11{% if inputs %}
2- < div class ="border border-base-200 rounded-default flex flex-col gap-2 justify-end p-3 lg:flex-row dark:border-base-800 {{ field_class }} ">
2+ < div class ="flex flex-col gap-2 justify-end lg:flex-row {{ field_class }} ">
33 {% for input in inputs %}
44 {% include "unfold_crispy/layout/baseinput.html" %}
55 {% endfor %}
Original file line number Diff line number Diff line change 99 {% csrf_token %}
1010 {% endif %}
1111
12- < div class ="overflow-x-auto border border-base-200 rounded-default shadow-xs dark:border-base-800 " {% if form_id %} id ="{{ form_id }} "{% endif %} >
12+ {% include "unfold_crispy/errors_formset.html" %}
13+
14+ < div class ="overflow-x-auto border border-base-200 mb-8 rounded-default shadow-xs dark:border-base-800 " {% if form_id %} id ="{{ form_id }} "{% endif %} >
1315 {{ formset.management_form|crispy }}
1416
1517 < table class ="w-full ">
6668 </ tbody >
6769 {% endif %}
6870 </ table >
69-
70- {% include "unfold_crispy/inputs.html" %}
7171 </ div >
7272
73+ {% include "unfold_crispy/inputs.html" %}
74+
7375 {% if formset_tag %}
7476 </ form >
7577 {% endif %}
Original file line number Diff line number Diff line change 1+ {% load crispy_forms_tags %}
2+ {% load crispy_forms_utils %}
3+
4+ {% specialspaceless %}
5+ {% if formset_tag %}
6+ < form {{ flat_attrs }} method ="{{ form_method }} " {% if formset.is_multipart %} enctype ="multipart/form-data "{% endif %} >
7+ {% endif %}
8+ {% if formset_method|lower == 'post' and not disable_csrf %}
9+ {% csrf_token %}
10+ {% endif %}
11+
12+ < div >
13+ {{ formset.management_form|crispy }}
14+ </ div >
15+
16+ {% include "unfold_crispy/errors_formset.html" %}
17+
18+ {% for form in formset %}
19+ {% include "unfold_crispy/display_form.html" %}
20+ {% endfor %}
21+
22+ {% if inputs %}
23+ < div class ="form-actions ">
24+ {% for input in inputs %}
25+ {% include "unfold_crispy/layout/baseinput.html" %}
26+ {% endfor %}
27+ </ div >
28+ {% endif %}
29+ {% if formset_tag %}</ form > {% endif %}
30+ {% endspecialspaceless %}
You can’t perform that action at this time.
0 commit comments