Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncrispyfy NAV's custom crispy templates #3008

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{% load crispy_forms_field %}
{% load forms %}

{% if field.is_hidden %}
{{ field }}
{% else %}
<div id="div_{{ field.auto_id }}" class="ctrlHolder{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.errors and form_show_errors %} error{% endif %}{% if field|is_checkbox %} checkbox{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
<div id="div_{{ field.auto_id }}" class="ctrlHolder{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.errors and form_show_errors %} error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
{% if field.label %}
{% if field|is_checkbox %}
{% crispy_field field %}
{{ field }}
{% endif %}

<label for="{{ field.id_for_label }}" {% if field.field.required %}class="requiredField"{% endif %}>
Expand All @@ -20,7 +20,7 @@
{% endif %}

{% if not field|is_checkbox %}
{% crispy_field field %}
{{ field }}
{% endif %}

{% if form_show_errors %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{% load crispy_forms_field %}

<div id="div_{{ field.auto_id }}" class="ctrlHolder{% if field.errors and form_show_errors %} error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
<label for="{{ field.id_for_label }}">
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
{% crispy_field field %}
{{ field }}
</label>
{% if form_show_errors %}
{% for error in field.errors %}
Expand Down
Loading