Whoops, use correct Bootstrap 4 classes to indicate invalid form fields

This commit is contained in:
Danielle McLean 2017-10-25 00:30:09 +11:00
parent 84a34c89e7
commit 53fbc804bd
Signed by: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -1,6 +1,6 @@
<div class="form-group{% if field.errors %} has-error{% endif %}">
<div class="form-group">
<label for="{{ field.id_for_label }}">{{ field.label | lower }}</label>
<input id="{{ field.id_for_label }}" class="form-control" type="{{ field.field.widget.input_type }}"
<input id="{{ field.id_for_label }}" class="form-control{% if field.errors %}is-invalid{% endif %}" type="{{ field.field.widget.input_type }}"
name="{{ field.html_name }}"{% if field.value %} value="{{ field.value }}"{% endif %}{% if field.help_text %} aria-describedby="{{ field.id_for_label }}-help"{% endif %} />
{% if field.help_text %}<p id="{{ field.id_for_label }}-help" class="form-text">{{ field.help_text }}</p>{% endif %}
</div>