Errors should be big red boxes

This commit is contained in:
Sachi King 2017-04-23 17:21:19 +10:00
parent 079f87b1d2
commit 18fcfddad6
3 changed files with 16 additions and 3 deletions

View file

@ -1,5 +1,9 @@
{% if field.errors %}
<div class="alert alert-danger col-sm-offset-2 col-sm-10" role="alert">
{{ field.errors }}
</div>
{% endif %}
<label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{ field.label }}{% if field.field.required %} *{% endif %}</label>
{{ field.errors }}
<div class="col-sm-10">
{{ field }}
{% if field.help_text %}

View file

@ -1,11 +1,16 @@
<h3>
{{ field.label }}{% if field.field.required %} *{% endif %}
{{ field.errors }}
</h3>
{% if field.help_text %}
<span class="help_text">{{ field.help_text|safe }}</span>
{% endif %}
{% if field.errors %}
<div class="alert alert-danger" role="alert">
{{ field.errors }}
</div>
{% endif %}
{% for item in field %}
<div class="col-sm-offset-2 col-sm-10">
{{ item }}

View file

@ -1,7 +1,11 @@
<h3>
{{ field.label }}{% if field.field.required %} *{% endif %}
{{ field.errors }}
</h3>
{% if field.errors %}
<div class="alert alert-danger col-sm-offset-2 col-sm-10" role="alert">
{{ field.errors }}
</div>
{% endif %}
<div class="col-sm-offset-2 col-sm-10">
<label class="form-check-label" for="id_profile-past_lca_0">
{{ field }}