Render error validation message with proper color
This commit is contained in:
parent
74fc5f0ec9
commit
993a6635b2
@ -1,7 +1,7 @@
|
|||||||
{% from "components/icon.html" import Icon %}
|
{% from "components/icon.html" import Icon %}
|
||||||
|
|
||||||
{% macro OptionsInput(field, inline=False) -%}
|
{% macro OptionsInput(field, inline=False) -%}
|
||||||
<div class='usa-input {% if errors %}usa-input--error{% endif %}'>
|
<div class='usa-input {% if field.errors %}usa-input--error{% endif %}'>
|
||||||
|
|
||||||
<fieldset class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
<fieldset class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
||||||
<legend>
|
<legend>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{% macro TextInput(field, placeholder='') -%}
|
{% macro TextInput(field, placeholder='') -%}
|
||||||
<div class='usa-input {% if errors %}usa-input--error{% endif %}'>
|
<div class='usa-input {% if errors %}usa-input--error{% endif %}'>
|
||||||
|
<label for={{field.name}}>
|
||||||
{{ field.label }}
|
{{ field.label }}
|
||||||
|
|
||||||
{% if field.description %}
|
{% if field.description %}
|
||||||
@ -9,6 +10,7 @@
|
|||||||
{% if errors %}
|
{% if errors %}
|
||||||
{{ Icon('alert') }}
|
{{ Icon('alert') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</label>
|
||||||
|
|
||||||
{{ field(placeholder=placeholder) | safe }}
|
{{ field(placeholder=placeholder) | safe }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user