Update checkbox macro to accept label
This commit is contained in:
parent
040ee87a8c
commit
23ec46141b
@ -1,11 +1,17 @@
|
|||||||
{% macro CheckboxInput(field, inline=False, classes="") -%}
|
{% macro CheckboxInput(
|
||||||
|
field,
|
||||||
|
label=field.label | striptags,
|
||||||
|
inline=False,
|
||||||
|
classes="") -%}
|
||||||
<checkboxinput name='{{ field.name }}' inline-template key='{{ field.name }}'>
|
<checkboxinput name='{{ field.name }}' inline-template key='{{ field.name }}'>
|
||||||
<div class='usa-input {{ classes }} {% if field.errors %}usa-input--error{% endif %}'>
|
<div class='usa-input {{ classes }} {% if field.errors %}usa-input--error{% endif %}'>
|
||||||
|
|
||||||
<fieldset v-on:change="onInput" class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
<fieldset v-on:change="onInput" class="usa-input__choices {% if inline %}usa-input__choices--inline{% endif %}">
|
||||||
<legend>
|
<legend>
|
||||||
{{ field() }}
|
{{ field() }}
|
||||||
{{ field.label }}
|
<label for={{field.name}}>
|
||||||
|
{{ label }}
|
||||||
|
</label>
|
||||||
|
|
||||||
{% if field.description %}
|
{% if field.description %}
|
||||||
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
<span class='usa-input__help'>{{ field.description | safe }}</span>
|
||||||
|
@ -43,15 +43,7 @@
|
|||||||
<div class="form-col">
|
<div class="form-col">
|
||||||
{% if not invited %}
|
{% if not invited %}
|
||||||
<div class='form-row'>
|
<div class='form-row'>
|
||||||
<div class='usa-input'>
|
{{ CheckboxInput(form.invite, label=(("forms.officers." + officer_type + "_invite") | translate)) }}
|
||||||
|
|
||||||
<fieldset v-on:change="onInput" class="usa-input__choices">
|
|
||||||
<legend>
|
|
||||||
{{ form.invite }}
|
|
||||||
<label for="contracting_officer-invite">{{ ("forms.officers." + officer_type + "_invite") | translate }}</label>
|
|
||||||
</legend>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class='form-row'>
|
<div class='form-row'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user