Add optional label to text, options, phone, and multi-checkbox inputs
Use new optional attribute on fields that are optional Update styling to fit optional label and update translations
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/tooltip.html" import Tooltip %}
|
||||
|
||||
{% macro MultiCheckboxInput(field, other_input_field=None, tooltip=None, inline=False) -%}
|
||||
{% macro MultiCheckboxInput(field, other_input_field=None, tooltip=None, inline=False, optional=True) -%}
|
||||
<multicheckboxinput
|
||||
v-cloak
|
||||
name='{{ field.name }}'
|
||||
@@ -24,6 +24,10 @@
|
||||
<legend>
|
||||
<div class="usa-input__title">
|
||||
{{ field.label | striptags}}
|
||||
{% if optional %}
|
||||
|
||||
<span class="usa-input-label-helper">(optional)</span>
|
||||
{% endif %}
|
||||
{% if tooltip %}{{ Tooltip(tooltip) }}{% endif %}
|
||||
{% if not field.description %}
|
||||
{{ validation_icons }}
|
||||
|
Reference in New Issue
Block a user