Place error icon next to text input box
This commit is contained in:
parent
cb2b9faa42
commit
e981ef917a
@ -1,3 +1,5 @@
|
|||||||
|
{% from "components/icon.html" import Icon %}
|
||||||
|
|
||||||
{% macro TextInput(field, placeholder='') -%}
|
{% macro TextInput(field, placeholder='') -%}
|
||||||
<div class='usa-input {% if field.errors %}usa-input--error{% endif %}'>
|
<div class='usa-input {% if field.errors %}usa-input--error{% endif %}'>
|
||||||
<label for={{field.name}}>
|
<label for={{field.name}}>
|
||||||
@ -7,9 +9,7 @@
|
|||||||
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if errors %}
|
{% if field.errors %}{{ Icon('alert') }}{% endif %}
|
||||||
{{ Icon('alert') }}
|
|
||||||
{% endif %}
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
{{ field(placeholder=placeholder) | safe }}
|
{{ field(placeholder=placeholder) | safe }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user