Persist text input for the field
This commit is contained in:
parent
c5007d9edb
commit
62ac2642ae
@ -20,7 +20,8 @@ export default {
|
||||
initialValue: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
initialOtherValue: String,
|
||||
},
|
||||
|
||||
|
||||
|
@ -1,12 +1,13 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/tooltip.html" import Tooltip %}
|
||||
|
||||
{% macro MultiCheckboxInput(field, tooltip, inline=False) -%}
|
||||
{% macro MultiCheckboxInput(field, other_input_field, tooltip, inline=False) -%}
|
||||
<multicheckboxinput
|
||||
name='{{ field.name }}'
|
||||
inline-template
|
||||
{% if field.errors %}v-bind:initial-errors='{{ field.errors | list }}'{% endif %}
|
||||
{% if field.data and field.data != "None" %}v-bind:initial-value="{{ field.data }}"{% endif %}
|
||||
{% if other_input_field.data and other_input_field.data != "None" %}v-bind:initial-other-value="{{ other_input_field.data }}"{% endif %}
|
||||
key='{{ field.name }}'>
|
||||
<div
|
||||
v-bind:class="['usa-input', { 'usa-input--error': showError, 'usa-input--success': showValid }]">
|
||||
@ -37,7 +38,7 @@
|
||||
<label for='{{ field.name }}-{{ field.choices.index(choice) }}'>{{ choice[1] }}</label>
|
||||
|
||||
<div v-show="otherChecked">
|
||||
<input type='text' name='{{ field.name}}_other' id='{{ field.name }}-other' aria-expanded='false'/>
|
||||
<input type='text' name='{{ field.name}}_other' id='{{ field.name }}-other' value="{{ other_input_field.data }}" aria-expanded='false' />
|
||||
</div>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
@ -29,12 +29,12 @@
|
||||
<h3>About Your Project</h3>
|
||||
{{ OptionsInput(form.app_migration) }}
|
||||
{{ OptionsInput(form.native_apps) }}
|
||||
{{ MultiCheckboxInput(form.complexity) }}
|
||||
{{ MultiCheckboxInput(form.complexity, form.complexity_other) }}
|
||||
|
||||
<hr>
|
||||
|
||||
<h3>About Your Team</h3>
|
||||
{{ MultiCheckboxInput(form.dev_team) }}
|
||||
{{ MultiCheckboxInput(form.dev_team, form.dev_team_other) }}
|
||||
{{ TextInput(form.dev_team_other) }}
|
||||
{{ OptionsInput(form.team_experience) }}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user