Toggle ko dod id input if Invite KO is checked

This commit is contained in:
Montana 2019-01-18 09:56:59 -05:00
parent 67108484be
commit 74ee9113dc
3 changed files with 10 additions and 39 deletions

View File

@ -1,31 +0,0 @@
import FormMixin from '../../mixins/form'
import textinput from '../text_input'
import checkboxinput from '../checkbox_input'
export default {
name: 'cor',
mixins: [FormMixin],
components: {
textinput,
checkboxinput,
},
props: {
initialData: {
type: Object,
default: () => ({})
}
},
data: function () {
const {
am_cor = false
} = this.initialData
return {
am_cor
}
}
}

View File

@ -11,7 +11,7 @@ import textinput from './components/text_input'
import checkboxinput from './components/checkbox_input' import checkboxinput from './components/checkbox_input'
import DetailsOfUse from './components/forms/details_of_use' import DetailsOfUse from './components/forms/details_of_use'
import poc from './components/forms/poc' import poc from './components/forms/poc'
import cor from './components/forms/cor' import oversight from './components/forms/oversight'
import financial from './components/forms/financial' import financial from './components/forms/financial'
import toggler from './components/toggler' import toggler from './components/toggler'
import NewApplication from './components/forms/new_application' import NewApplication from './components/forms/new_application'
@ -45,7 +45,7 @@ const app = new Vue({
checkboxinput, checkboxinput,
DetailsOfUse, DetailsOfUse,
poc, poc,
cor, oversight,
financial, financial,
NewApplication, NewApplication,
selector, selector,

View File

@ -13,16 +13,18 @@
<!-- Oversight Section --> <!-- Oversight Section -->
<h3 class="subheading">{{ "task_orders.new.oversight.ko_info_title" | translate }}</h3> <h3 class="subheading">{{ "task_orders.new.oversight.ko_info_title" | translate }}</h3>
<p>{{ "task_orders.new.oversight.ko_info_paragraph" | translate }}</p> <p>{{ "task_orders.new.oversight.ko_info_paragraph" | translate }}</p>
<oversight inline-template v-bind:initial-data='{{ form.data|tojson }}'>
<div class='usa-input'>
{{ UserInfo(form.ko_first_name, form.ko_last_name, form.ko_email, form.ko_phone_number) }} {{ UserInfo(form.ko_first_name, form.ko_last_name, form.ko_email, form.ko_phone_number) }}
{{ CheckboxInput(form.ko_invite) }} {{ CheckboxInput(form.ko_invite) }}
<template v-if="ko_invite">
{{ TextInput(form.ko_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why', validation='dodId')}} {{ TextInput(form.ko_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why', validation='dodId')}}
</template>
<hr /> <hr />
<h3 class="subheading">{{ "task_orders.new.oversight.cor_info_title" | translate }}</h3> <h3 class="subheading">{{ "task_orders.new.oversight.cor_info_title" | translate }}</h3>
<p>{{ "task_orders.new.oversight.cor_info_paragraph" | translate }}</p> <p>{{ "task_orders.new.oversight.cor_info_paragraph" | translate }}</p>
<cor inline-template v-bind:initial-data='{{ form.data|tojson }}'>
<div class='usa-input'>
{{ CheckboxInput(form.am_cor) }} {{ CheckboxInput(form.am_cor) }}
<template v-if="!am_cor"> <template v-if="!am_cor">
{{ UserInfo(form.cor_first_name, form.cor_last_name, form.cor_email, form.cor_phone_number) }} {{ UserInfo(form.cor_first_name, form.cor_last_name, form.cor_email, form.cor_phone_number) }}
@ -30,7 +32,7 @@
{{ TextInput(form.cor_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why', validation='dodId')}} {{ TextInput(form.cor_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why', validation='dodId')}}
</template> </template>
</div> </div>
</cor> </oversight>
<hr /> <hr />