diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-14 18:02:11 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2018-02-15 17:20:19 +0100 |
| commit | 7c3a4661c5a783cce329210fad5af2db6ea48155 (patch) | |
| tree | 07d1aba6b9abed5acf2ef1b13729a616572cb710 /ishtar_common/templates | |
| parent | 6a32aa4712b173b76b718e8aa478df38af21e5ed (diff) | |
| download | Ishtar-7c3a4661c5a783cce329210fad5af2db6ea48155.tar.bz2 Ishtar-7c3a4661c5a783cce329210fad5af2db6ea48155.zip | |
UI: fix error message
Diffstat (limited to 'ishtar_common/templates')
| -rw-r--r-- | ishtar_common/templates/blocks/bs_field_snippet.html | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ishtar_common/templates/blocks/bs_field_snippet.html b/ishtar_common/templates/blocks/bs_field_snippet.html index c157461b7..f9cdeb68e 100644 --- a/ishtar_common/templates/blocks/bs_field_snippet.html +++ b/ishtar_common/templates/blocks/bs_field_snippet.html @@ -1,5 +1,5 @@ {% load i18n %} - <div class="form-group col-lg-6{% if field.field.required %} required{% endif %}"> + <div class="form-group col-lg-6{% if field.errors %} is-invalid{% endif %}{% if field.field.required %} required{% endif %}"> {{ field.label_tag }} {% if field.help_text %} <div class="input-group"> @@ -13,6 +13,9 @@ <i class="fa fa-question-circle" aria-hidden="true"></i> </a> </span> + {% if field.errors %}<div class="invalid"> + {{ field.errors }} + </div>{% endif %} </div> <div class="collapse" id="{{field.auto_id}}_help"> <div class="card card-body"> @@ -20,7 +23,8 @@ </div> </div> {% endif %} - {% if field.errors %}<div class="invalid-feedback"> + {% if field.errors and not field.help_text %} + <div class="invalid"> {{ field.errors }} </div>{% endif %} </div> |
