Refactor fv form to separate TO from request

This commit is contained in:
richard-dds
2018-10-22 22:16:39 -04:00
parent 1606bad016
commit 0439525f0f
9 changed files with 295 additions and 329 deletions

View File

@@ -68,55 +68,55 @@
{% if extended %}
<fieldset class="form__sub-fields form__sub-fields--warning">
{{ OptionsInput(f.funding_type) }}
{{ OptionsInput(f.task_order.funding_type) }}
<template v-if="funding_type == 'OTHER'" v-cloak>
{{ TextInput(f.funding_type_other) }}
{{ TextInput(f.task_order.funding_type_other) }}
</template>
{{ DateInput(f.expiration_date, placeholder='MM / DD / YYYY', validation='date', tooltip='Please enter the expiration date for the task order only and do not include options that you may choose to exercise in the future.') }}
{{ DateInput(f.task_order.expiration_date, placeholder='MM / DD / YYYY', validation='date', tooltip='Please enter the expiration date for the task order only and do not include options that you may choose to exercise in the future.') }}
{{ TextInput(
f.clin_0001,
f.task_order.clin_0001,
validation='dollars'
) }}
{{ TextInput(
f.clin_0003,
f.task_order.clin_0003,
validation='dollars'
) }}
{{ TextInput(
f.clin_1001,
f.task_order.clin_1001,
validation='dollars'
) }}
{{ TextInput(
f.clin_1003,
f.task_order.clin_1003,
validation='dollars'
) }}
{{ TextInput(
f.clin_2001,
f.task_order.clin_2001,
validation='dollars'
) }}
{{ TextInput(
f.clin_2003,
f.task_order.clin_2003,
validation='dollars'
) }}
<template v-if="showTaskOrder">
<div class="usa-input {% if f.task_order.errors %} usa-input--error {% endif %}">
{{ f.task_order.label }}
{{ f.task_order }}
{% for error in f.task_order.errors %}
<div class="usa-input {% if f.task_order.pdf.errors %} usa-input--error {% endif %}">
{{ f.task_order.pdf.label }}
{{ f.task_order.pdf }}
{% for error in f.task_order.pdf.errors %}
<span class="usa-input__message">{{error}}</span>
{% endfor %}
</div>
</template>
<template v-else>
<p>Uploaded {{ f.task_order.data }}.</p>
<p>Uploaded {{ f.task_order.pdf.data }}.</p>
<div>
<button v-on:click="forceShowTaskOrder($event)">Change</button>
</div>
@@ -125,52 +125,52 @@
{% endif %}
{{ TextInput(
f.task_order_number,
f.task_order.number,
placeholder="e.g.: 1234567899C0001",
tooltip="A Contracting Officer will likely be the best source for this number.",
validation="anything"
) }}
{{ TextInput(f.uii_ids,
{{ TextInput(f.request.uii_ids,
paragraph=True,
placeholder="examples: \nDI 0CVA5786950 \nUN1945326361234786950",
tooltip="A Unique Item Identifer is a unique code that helps the Department of Defense track and report on where and how digital assets are stored. <br>Not all applications have an existing UII number assigned."
) }}
{{ TextInput(f.pe_id,
{{ TextInput(f.request.pe_id,
placeholder="e.g.: 0105688F",
validation="peNumber"
) }}
{{ TextInput(f.treasury_code,placeholder="e.g.: 00123456",validation="treasuryCode") }}
{{ TextInput(f.request.treasury_code,placeholder="e.g.: 00123456",validation="treasuryCode") }}
{{ TextInput(f.ba_code,placeholder="e.g.: 02A",validation="baCode") }}
{{ TextInput(f.request.ba_code,placeholder="e.g.: 02A",validation="baCode") }}
<hr />
<h3>Contracting Officer (KO) Information</h3>
<div class='form-row'>
<div class='form-col form-col--half '>{{ TextInput(f.fname_co) }}</div>
<div class='form-col form-col--half '>{{ TextInput(f.lname_co) }}</div>
<div class='form-col form-col--half '>{{ TextInput(f.request.fname_co) }}</div>
<div class='form-col form-col--half '>{{ TextInput(f.request.lname_co) }}</div>
</div>
<div class='form-row'>
<div class='form-col form-col--half'>{{ TextInput(f.email_co,validation='email', placeholder='e.g. jane@mail.mil') }}</div>
<div class='form-col form-col--half'>{{ TextInput(f.office_co,placeholder="e.g.: WHS") }}</div>
<div class='form-col form-col--half'>{{ TextInput(f.request.email_co,validation='email', placeholder='e.g. jane@mail.mil') }}</div>
<div class='form-col form-col--half'>{{ TextInput(f.request.office_co,placeholder="e.g.: WHS") }}</div>
</div>
<hr />
<h3>Contracting Officer Representative (COR) Information</h3>
<div class='form-row'>
<div class='form-col form-col--half '>{{ TextInput(f.fname_cor) }}</div>
<div class='form-col form-col--half '>{{ TextInput(f.lname_cor) }}</div>
<div class='form-col form-col--half '>{{ TextInput(f.request.fname_cor) }}</div>
<div class='form-col form-col--half '>{{ TextInput(f.request.lname_cor) }}</div>
</div>
<div class='form-row'>
<div class='form-col form-col--half'>{{ TextInput(f.email_cor,validation='email', placeholder='e.g. jane@mail.mil') }}</div>
<div class='form-col form-col--half'>{{ TextInput(f.office_cor,placeholder="e.g.: WHS") }}</div>
<div class='form-col form-col--half'>{{ TextInput(f.request.email_cor,validation='email', placeholder='e.g. jane@mail.mil') }}</div>
<div class='form-col form-col--half'>{{ TextInput(f.request.office_cor,placeholder="e.g.: WHS") }}</div>
</div>