Remove spaceless in forms, fix css class errors

This commit is contained in:
Valentin Samir 2016-11-20 16:50:49 +01:00
parent b80947755a
commit 64d3901ec4
2 changed files with 3 additions and 2 deletions

View file

@ -20,6 +20,7 @@ Fixed
----- -----
* Allow both unicode and bytes dotted string in utils.import_attr * Allow both unicode and bytes dotted string in utils.import_attr
* Fix some spelling and grammar on log messages. (thanks to Allie Micka) * Fix some spelling and grammar on log messages. (thanks to Allie Micka)
* Fix froms css class error on success/error due to a scpaless block
Changed Changed
------- -------

View file

@ -6,13 +6,13 @@
</div> </div>
{% endfor %} {% endfor %}
{% for field in form %}{% if not field|is_hidden %} {% for field in form %}{% if not field|is_hidden %}
<div class="form-group{% spaceless %} <div class="form-group
{% if not form.non_field_errors %} {% if not form.non_field_errors %}
{% if field.errors %} has-error {% if field.errors %} has-error
{% elif form.cleaned_data %} has-success {% elif form.cleaned_data %} has-success
{% endif %} {% endif %}
{% endif %}" {% endif %}"
{% endspaceless %}>{% spaceless %} >{% spaceless %}
{% if field|is_checkbox %} {% if field|is_checkbox %}
<div class="checkbox"><label for="{{field.auto_id}}">{{field}}{{field.label}}</label></div> <div class="checkbox"><label for="{{field.auto_id}}">{{field}}{{field.label}}</label></div>
{% else %} {% else %}