-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3073 from Uninett/uncrispify/add-spaceless-around…
…-help-field-template Add spaceless wrapper around helpfield template
- Loading branch information
Showing
1 changed file
with
29 additions
and
28 deletions.
There are no files selected for viewing
57 changes: 29 additions & 28 deletions
57
python/nav/web/templates/custom_crispy_templates/field_helptext_as_icon.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,34 +1,35 @@ | ||
{% load forms %} | ||
{% spaceless %} | ||
{% if field.is_hidden %} | ||
{{ field }} | ||
{% else %} | ||
<div id="div_{{ field.auto_id }}" class="ctrlHolder{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.errors %} error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> | ||
{% if field.label %} | ||
{% if field|is_checkbox %} | ||
{{ field }} | ||
{% endif %} | ||
|
||
{% if field.is_hidden %} | ||
{{ field }} | ||
{% else %} | ||
<div id="div_{{ field.auto_id }}" class="ctrlHolder{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.errors %} error{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}"> | ||
{% if field.label %} | ||
{% if field|is_checkbox %} | ||
{{ field }} | ||
<label for="{{ field.id_for_label }}" {% if field.field.required %}class="requiredField"{% endif %}> | ||
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %} | ||
{% if field.help_text %} | ||
<i id="hint_{{ field.auto_id }}" class="fa fa-info-circle" data-tooltip title=" | ||
{{ field.help_text }} | ||
"></i> | ||
{% endif %} | ||
</label> | ||
{% endif %} | ||
|
||
<label for="{{ field.id_for_label }}" {% if field.field.required %}class="requiredField"{% endif %}> | ||
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %} | ||
{% if field.help_text %} | ||
<i id="hint_{{ field.auto_id }}" class="fa fa-info-circle" data-tooltip title=" | ||
{{ field.help_text }} | ||
"></i> | ||
{% endif %} | ||
</label> | ||
{% endif %} | ||
|
||
{% if not field|is_checkbox %} | ||
{{ field }} | ||
{% endif %} | ||
{% if not field|is_checkbox %} | ||
{{ field }} | ||
{% endif %} | ||
|
||
{% for error in field.errors %} | ||
<small id="error_{{ forloop.counter }}_{{ field.auto_id }}" | ||
class="errorField"> | ||
{{ error }} | ||
</small> | ||
{% endfor %} | ||
{% for error in field.errors %} | ||
<small id="error_{{ forloop.counter }}_{{ field.auto_id }}" | ||
class="errorField"> | ||
{{ error }} | ||
</small> | ||
{% endfor %} | ||
|
||
</div> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
{% endspaceless %} |