Merge branch 'master' into ui/tooltips
This commit is contained in:
@@ -2,34 +2,36 @@
|
||||
{% from "components/tooltip.html" import Tooltip %}
|
||||
|
||||
{% macro OptionsInput(field, tooltip, inline=False) -%}
|
||||
<div class='usa-input {% if field.errors %}usa-input--error{% endif %}'>
|
||||
<optionsinput name='{{ field.name }}' inline-template key='{{ field.name }}'>
|
||||
<div class='usa-input {% if field.errors %}usa-input--error{% endif %}'>
|
||||
|
||||
<fieldset class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
||||
<legend>
|
||||
<div class="usa-input__title">
|
||||
{{ field.label | striptags}}
|
||||
{% if tooltip %}{{ Tooltip(tooltip) }}{% endif %}
|
||||
</div>
|
||||
{% if field.description %}
|
||||
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
||||
{% endif %}
|
||||
<fieldset v-on:change="onInput" class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
||||
<legend>
|
||||
<div class="usa-input__title">
|
||||
{{ field.label | striptags}}
|
||||
{% if tooltip %}{{ Tooltip(tooltip) }}{% endif %}
|
||||
</div>
|
||||
|
||||
{% if field.description %}
|
||||
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if field.errors %}
|
||||
{{ Icon('alert',classes="icon-validation")) }}
|
||||
{% endif %}
|
||||
</legend>
|
||||
|
||||
{{ field() }}
|
||||
|
||||
{% if field.errors %}
|
||||
{{ Icon('alert',classes="icon-validation") }}
|
||||
{% for error in field.errors %}
|
||||
<span class='usa-input__message'>{{ error }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</legend>
|
||||
|
||||
{{ field() }}
|
||||
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<span class='usa-input__message'>{{ error }}</span>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
</optionsinput>
|
||||
|
||||
{%- endmacro %}
|
||||
|
@@ -7,6 +7,7 @@
|
||||
validation='{{ validation }}'
|
||||
{% if field.data %}initial-value='{{ field.data }}'{% endif %}
|
||||
{% if field.errors %}v-bind:initial-errors='{{ field.errors }}'{% endif %}
|
||||
key='{{ field.name }}'
|
||||
inline-template>
|
||||
|
||||
<div
|
||||
|
Reference in New Issue
Block a user