From 3d34950503747d776fe730053e42669117982b3a Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 30 Jan 2018 22:35:42 +0000 Subject: [PATCH] Cleanup custom Bootstrap 4 + crispy forms workaround --- .../templates/bootstrap4/field.html | 50 ------------------- .../bootstrap4/layout/field_errors_block.html | 7 --- 2 files changed, 57 deletions(-) delete mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/field.html delete mode 100644 {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/layout/field_errors_block.html diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/field.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/field.html deleted file mode 100644 index 2943e7192..000000000 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/field.html +++ /dev/null @@ -1,50 +0,0 @@ -{% raw %} -{% load crispy_forms_field %} - -{% if field.is_hidden %} - {{ field }} -{% else %} - {% if field|is_checkbox %} -
- {% if label_class %} -
- {% endif %} - {% endif %} - <{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" {% if not field|is_checkbox %}class="form-group{% if using_grid_layout %} row{% endif %}{% else %}class="checkbox{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors%}{% if field.errors %} has-danger{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> - {% if field.label and not field|is_checkbox and form_show_labels %} - - {% endif %} - - {% if field|is_checkboxselectmultiple %} - {% include 'bootstrap4/layout/checkboxselectmultiple.html' %} - {% endif %} - - {% if field|is_radioselect %} - {% include 'bootstrap4/layout/radioselect.html' %} - {% endif %} - - {% if not field|is_checkboxselectmultiple and not field|is_radioselect %} - {% if field|is_checkbox and form_show_labels %} - - {% else %} -
- {% crispy_field field %} -
- {% include 'bootstrap4/layout/help_text_and_errors.html' %} - {% endif %} - {% endif %} - - {% if field|is_checkbox %} - {% if label_class %} -
- {% endif %} -
- {% endif %} -{% endif %} -{% endraw %} \ No newline at end of file diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/layout/field_errors_block.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/layout/field_errors_block.html deleted file mode 100644 index 57c979e6c..000000000 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/bootstrap4/layout/field_errors_block.html +++ /dev/null @@ -1,7 +0,0 @@ -{% raw %} -{% if form_show_errors and field.errors %} - {% for error in field.errors %} -

{{ error }}

- {% endfor %} -{% endif %} -{% endraw %}