forked from django-crispy-forms/crispy-bootstrap5
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix TemplateDoesNotExist when using MultiField (django-crispy-forms#75)
- Loading branch information
1 parent
bb9021e
commit f931d54
Showing
2 changed files
with
8 additions
and
27 deletions.
There are no files selected for viewing
30 changes: 3 additions & 27 deletions
30
crispy_bootstrap5/templates/bootstrap5/layout/multifield.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,3 @@ | ||
{% load crispy_forms_field %} | ||
|
||
{% if field.is_hidden %} | ||
{{ field }} | ||
{% else %} | ||
|
||
{% if field.label %} | ||
<label for="{{ field.id_for_label }}"{% if labelclass %} class="{{ labelclass }}"{% endif %}> | ||
{% endif %} | ||
|
||
{% if field|is_checkbox %} | ||
{% crispy_field field %} | ||
{% endif %} | ||
|
||
{% if field.label %} | ||
{{ field.label }} | ||
{% endif %} | ||
|
||
{% if not field|is_checkbox %} | ||
{% crispy_field field %} | ||
{% endif %} | ||
|
||
{% if field.label %} | ||
</label> | ||
{% endif %} | ||
|
||
{% endif %} | ||
<div class="d-flex gap-2"> | ||
{{ fields_output }} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{% load crispy_forms_field %} | ||
|
||
<div> | ||
{% include 'bootstrap5/field.html' %} | ||
</div> |