-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
whole_uni_formset and errors_formset are required to be able to use formset_factory. Adds the required templates and enables the skipped tests with appropriate modifications to assertions.
- Loading branch information
1 parent
a7c228b
commit 89e74e5
Showing
4 changed files
with
47 additions
and
8 deletions.
There are no files selected for viewing
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,8 @@ | ||
{% if formset.non_form_errors %} | ||
<div class="alert alert-block alert-danger"> | ||
{% if formset_error_title %}<h4 class="alert-heading">{{ formset_error_title }}</h4>{% endif %} | ||
<ul class="m-0"> | ||
{{ formset.non_form_errors|unordered_list }} | ||
</ul> | ||
</div> | ||
{% endif %} |
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,6 @@ | ||
<fieldset {% if fieldset.css_id %}id="{{ fieldset.css_id }}"{% endif %} | ||
{% if fieldset.css_class or form_style %}class="{{ fieldset.css_class }} {{ form_style }}"{% endif %} | ||
{{ fieldset.flat_attrs }}> | ||
{% if legend %}<legend>{{ legend|safe }}</legend>{% endif %} | ||
{{ fields|safe }} | ||
</fieldset> |
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,30 @@ | ||
{% load crispy_forms_tags %} | ||
{% load crispy_forms_utils %} | ||
|
||
{% specialspaceless %} | ||
{% if formset_tag %} | ||
<form {{ flat_attrs }} method="{{ form_method }}" {% if formset.is_multipart %} enctype="multipart/form-data"{% endif %}> | ||
{% endif %} | ||
{% if formset_method|lower == 'post' and not disable_csrf %} | ||
{% csrf_token %} | ||
{% endif %} | ||
|
||
<div> | ||
{{ formset.management_form|crispy }} | ||
</div> | ||
|
||
{% include "bulma/errors_formset.html" %} | ||
|
||
{% for form in formset %} | ||
{% include "bulma/display_form.html" %} | ||
{% endfor %} | ||
|
||
{% if inputs %} | ||
<div class="form-actions"> | ||
{% for input in inputs %} | ||
{% include "bulma/layout/baseinput.html" %} | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
{% if formset_tag %}</form>{% endif %} | ||
{% endspecialspaceless %} |
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