Merge pull request #145 from dod-ccpo/ui/request-form

UI/request form labels
This commit is contained in:
andrewdds
2018-08-09 13:54:26 -04:00
committed by GitHub
5 changed files with 26 additions and 17 deletions

View File

@@ -1,11 +1,11 @@
{% from "components/icon.html" import Icon %}
{% 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 %}">
<legend>
{{ field.label }}
{{ field.label | striptags}}
{% if field.description %}
<span class='usa-input__help'>{{ field.description | safe }}</span>
@@ -26,4 +26,7 @@
</fieldset>
</div>
{%- endmacro %}

View File

@@ -1,5 +1,7 @@
{% from "components/icon.html" import Icon %}
{% macro TextInput(field, placeholder='') -%}
<div class='usa-input {% if errors %}usa-input--error{% endif %}'>
<div class='usa-input {% if field.errors %}usa-input--error{% endif %}'>
<label for={{field.name}}>
{{ field.label }}
@@ -7,9 +9,7 @@
<span class='usa-input__help'>{{ field.description | safe }}</span>
{% endif %}
{% if errors %}
{{ Icon('alert') }}
{% endif %}
{% if field.errors %}{{ Icon('alert') }}{% endif %}
</label>
{{ field(placeholder=placeholder) | safe }}
@@ -20,4 +20,4 @@
{% endfor %}
{% endif %}
</div>
{%- endmacro %}
{%- endmacro %}