Update text on clin card and reorder fields

This commit is contained in:
leigh-mil 2019-09-03 10:53:14 -04:00
parent 104a1d189c
commit 274fa4470c
5 changed files with 258 additions and 211 deletions

View File

@ -34,12 +34,13 @@ class CLINForm(FlaskForm):
label=translate("task_orders.form.clin_number_label"), validators=[Optional()]
)
start_date = DateField(
translate("forms.task_order.start_date_label"),
translate("task_orders.form.pop_start"),
description="For example: 07 04 1776",
format="%m/%d/%Y",
validators=[Optional()],
)
end_date = DateField(
translate("forms.task_order.end_date_label"),
translate("task_orders.form.pop_end"),
format="%m/%d/%Y",
validators=[Optional()],
)

View File

@ -16,6 +16,11 @@
}
}
&__title {
padding: $gap * 2;
background-color: $color-gray-lightest;
}
&__header h3 {
margin-top: 0;
}

View File

@ -100,7 +100,7 @@
}
.form-row {
margin: 0;
margin-top: 0;
}
select {
@ -243,3 +243,7 @@
display: flex;
justify-content: center;
}
.clin-card {
width: 65rem;
}

View File

@ -24,35 +24,20 @@
v-bind:initial-clin-type="'JEDI_CLIN_1'"
{% endif %}
inline-template>
<div class="card">
<div class="h3">
<div class="clin-card">
<div class="card__title h4">
{{ 'task_orders.form.base_clin_title' | translate }}
</div>
<div class="card">
<div class="form-row">
<div class="form-col form-col--two-thirds">
{% if fields %}
{{ OptionsInput(fields.jedi_clin_type, watch=True, show_validation=False) }}
{% else %}
<optionsinput :name="'clins-' + clinIndex + '-jedi_clin_type'" :watch='true' :optional='false' inline-template>
<div class="usa-input">
<fieldset data-ally-disabled="true" class="usa-input__choices" v-on:change="onInput">
<legend>
<div class="usa-input__title">
{{ 'task_orders.form.clin_type_label' | translate }}
<div class="form-col">
<div class="h4">
CLIN Details
</div>
</legend>
<select :id='name' :name='name'>
<option value="JEDI_CLIN_1">{{ "forms.task_order.clin_01_label" | translate }}</option>
<option value="JEDI_CLIN_2">{{ "forms.task_order.clin_02_label" | translate }}</option>
<option value="JEDI_CLIN_3">{{ "forms.task_order.clin_03_label" | translate }}</option>
<option value="JEDI_CLIN_4">{{ "forms.task_order.clin_04_label" | translate }}</option>
</select>
</fieldset>
</div>
</optionsinput>
{% endif %}
</div>
<div class="form-col form-col--third">
<div class="form-row">
<div class="form-col">
{% if fields %}
{{ TextInput(fields.number, watch=True) }}
{% else %}
@ -91,151 +76,46 @@
{% endif %}
</div>
</div>
<div class="form-row">
<div class="form-col">
{% if fields %}
<div class="form-col form-col--half">
{{ DatePicker(fields.start_date, watch=True, optional=False) }}
</div>
<div class="form-col form-col--half">
{{ DatePicker(fields.end_date, watch=True, optional=False) }}
</div>
{{ OptionsInput(fields.jedi_clin_type, watch=True, show_validation=False) }}
{% else %}
<div class="form-col form-col--half">
<date-selector :name-tag="'clins-' + clinIndex + '-start_date'" :watch='true' :optional='false' inline-template>
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
<optionsinput :name="'clins-' + clinIndex + '-jedi_clin_type'" :watch='true' :optional='false' inline-template>
<div class="usa-input">
<fieldset data-ally-disabled="true" class="usa-input__choices" v-on:change="onInput">
<legend>
<div class="usa-input__title">
{{ 'task_orders.form.pop_start' | translate }}
{{ 'task_orders.form.clin_type_label' | translate }}
</div>
</legend>
<div class="date-picker-component">
<input :name="name" v-bind:value="formattedDate" v-on:change="onInput" type="hidden" />
<div class="usa-form-group usa-form-group-month">
<label>{{ 'components.date_selector.month' | translate }}</label>
<input
name="date-month"
max="12"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (month && !isMonthValid) }"
v-model="month"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-day">
<label>{{ 'components.date_selector.day' | translate }}</label>
<input
name="date-day"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (day && !isDayValid) }"
v-bind:max="daysMaxCalculation"
v-model="day"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-year">
<label>{{ 'components.date_selector.year' | translate }}</label>
<input
name="date-year"
maxlength="4"
type="number"
v-model="year"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group-date-ok" v-if="isDateValid">
{{ Icon("ok", classes="icon--green") }}
</div>
</div>
<select :id='name' :name='name'>
<option value="JEDI_CLIN_1">{{ "forms.task_order.clin_01_label" | translate }}</option>
<option value="JEDI_CLIN_2">{{ "forms.task_order.clin_02_label" | translate }}</option>
<option value="JEDI_CLIN_3">{{ "forms.task_order.clin_03_label" | translate }}</option>
<option value="JEDI_CLIN_4">{{ "forms.task_order.clin_04_label" | translate }}</option>
</select>
</fieldset>
</date-selector>
</div>
<div class="form-col form-col--half">
<date-selector :name-tag="'clins-' + clinIndex + '-end_date'" :watch='true' :optional='false' inline-template>
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
<legend>
<div class="usa-input__title">
{{ 'task_orders.form.pop_end' | translate }}
</div>
</legend>
<div class="date-picker-component">
<input :name="name" v-bind:value="formattedDate" v-on:change="onInput" type="hidden" />
<div class="usa-form-group usa-form-group-month">
<label>{{ 'components.date_selector.month' | translate }}</label>
<input
name="date-month"
max="12"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (month && !isMonthValid) }"
v-model="month"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-day">
<label>{{ 'components.date_selector.day' | translate }}</label>
<input
name="date-day"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (day && !isDayValid) }"
v-bind:max="daysMaxCalculation"
v-model="day"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-year">
<label>{{ 'components.date_selector.year' | translate }}</label>
<input
name="date-year"
maxlength="4"
type="number"
v-model="year"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group-date-ok" v-if="isDateValid">
{{ Icon("ok", classes="icon--green") }}
</div>
</div>
</fieldset>
</date-selector>
</div>
</optionsinput>
{% endif %}
</div>
</div>
<hr>
<div class="form-row">
<p class="usa-input-error-message form-has-errors">
<template v-if='showPopError'>
{% if fields and fields.start_date.errors %}
{{ fields.start_date.errors[0] }}
{% else %}
{{ "forms.task_order.start_date_error" | translate }}
{% endif %}
</template>
</p>
<div class="h4">
CLIN Funding
</div>
</div>
{% if fields %}
<div class="form-row">
<div class="form-column">
{{ TextInput(fields.obligated_amount, validation='dollars', watch=True) }}
</div>
</div>
{% else %}
<div class="form-row">
<div class="form-column">
<textinput
v-cloak
inline-template
@ -274,7 +154,166 @@
</template>
</div>
</textinput>
</div>
</div>
{% endif %}
<hr>
<div class="form-row">
<div class="h4">
Period of Performance
</div>
</div>
{% if fields %}
<div class="form-row">
<div class="form-col">
{{ DatePicker(fields.start_date, watch=True, optional=False) }}
</div>
</div>
<div class="form-row">
<div class="form-col">
{{ DatePicker(fields.end_date, watch=True, optional=False) }}
</div>
</div>
{% else %}
<div class="form-row">
<div class="form-col">
<date-selector :name-tag="'clins-' + clinIndex + '-start_date'" :watch='true' :optional='false' inline-template>
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
<legend>
<div class="usa-input__title">
{{ 'task_orders.form.pop_start' | translate }}
</div>
<p class='usa-input__help'>
For example: 07 04 1776
</p>
</legend>
<div class="date-picker-component">
<input :name="name" v-bind:value="formattedDate" v-on:change="onInput" type="hidden" />
<div class="usa-form-group usa-form-group-month">
<label>{{ 'components.date_selector.month' | translate }}</label>
<input
name="date-month"
max="12"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (month && !isMonthValid) }"
v-model="month"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-day">
<label>{{ 'components.date_selector.day' | translate }}</label>
<input
name="date-day"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (day && !isDayValid) }"
v-bind:max="daysMaxCalculation"
v-model="day"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-year">
<label>{{ 'components.date_selector.year' | translate }}</label>
<input
name="date-year"
maxlength="4"
type="number"
v-model="year"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group-date-ok" v-if="isDateValid">
{{ Icon("ok", classes="icon--green") }}
</div>
</div>
</fieldset>
</date-selector>
</div>
</div>
<div class="form-row">
<div class="form-col">
<date-selector :name-tag="'clins-' + clinIndex + '-end_date'" :watch='true' :optional='false' inline-template>
<fieldset class="usa-input date-picker" v-bind:class="{ 'usa-input--success': isDateValid }">
<legend>
<div class="usa-input__title">
{{ 'task_orders.form.pop_end' | translate }}
</div>
<p class='usa-input__help'>
For example: 07 04 1776
</p>
</legend>
<div class="date-picker-component">
<input :name="name" v-bind:value="formattedDate" v-on:change="onInput" type="hidden" />
<div class="usa-form-group usa-form-group-month">
<label>{{ 'components.date_selector.month' | translate }}</label>
<input
name="date-month"
max="12"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (month && !isMonthValid) }"
v-model="month"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-day">
<label>{{ 'components.date_selector.day' | translate }}</label>
<input
name="date-day"
maxlength="2"
min="1"
type="number"
v-bind:class="{ 'usa-input-error': (day && !isDayValid) }"
v-bind:max="daysMaxCalculation"
v-model="day"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group usa-form-group-year">
<label>{{ 'components.date_selector.year' | translate }}</label>
<input
name="date-year"
maxlength="4"
type="number"
v-model="year"
v-on:change="onInput"
/>
</div>
<div class="usa-form-group-date-ok" v-if="isDateValid">
{{ Icon("ok", classes="icon--green") }}
</div>
</div>
</fieldset>
</date-selector>
</div>
</div>
{% endif %}
<div class="form-row">
<p class="usa-input-error-message form-has-errors">
<template v-if='showPopError'>
{% if fields and fields.start_date.errors %}
{{ fields.start_date.errors[0] }}
{% else %}
{{ "forms.task_order.start_date_error" | translate }}
{% endif %}
</template>
</p>
</div>
</div>
</div>
</clin-fields>
{% endmacro %}

View File

@ -189,7 +189,6 @@ forms:
military: Military
other: Other <em class='description'>(E.g. University or other partner)</em>
dev_team_other_label: Development Team Other
end_date_label: End of period of performance (PoP)
file_format_not_allowed: Only PDF or PNG files can be uploaded.
native_apps:
description: Do you plan to develop any applications in the cloud?
@ -201,7 +200,6 @@ forms:
scope_description: 'What do you plan to do on the cloud? Some examples might include migrating an existing application or creating a prototype. You dont need to include a detailed plan of execution, but should list key requirements. This section will be reviewed by your contracting officer, but wont be sent to the CCPO. <p>Not sure how to describe your scope? <a href="#">Read some examples</a> to get some inspiration.</p>'
scope_label: Cloud project scope
start_date_error: PoP start date must be before end date.
start_date_label: Start of period of performance (PoP)
team_experience:
built_1: Built, migrated, or consulted on 1-2 applications
built_3: Built, migrated, or consulted on 3-5 applications
@ -362,21 +360,21 @@ task_orders:
pop_start: PoP Start
pop_end: PoP End
form:
add_clin: Enter another CLIN
add_clin: Add another CLIN
add_to_header: Add your task order
add_to_description: Now, refer to your document to find the 13-digit task order number. It should be located at lorem ipsum dolar. From now on we'll refer to this portion of funding by the recorded task order number.
clin_title: Enter CLINs
clin_description: "Continue to refer to your TO to locate your Contract Line Item Numbers (CLINs). You must add CLINs one at a time, and select a corresponding ID/IQ description for each."
base_clin_title: Base CLIN Information
clin_number_label: Enter task order CLIN
clin_type_label: "Select ID/IQ CLIN description"
clin_title: Enter Contract Line Items
clin_description: "Refer to your task order to locate your Contract Line Item Numbers (CLINs)."
base_clin_title: CLIN
clin_number_label: CLIN Number
clin_type_label: Corresponding IDIQ CLIN
cloud_funding_header: Add the summary of cloud funding
cloud_funding_text: Data must match with what is in your uploaded document.
draft_alert_title: Your information has been saved
draft_alert_message: You can return to the Task Order Builder to enter missing information. Once you are finished, youll be ready to submit this request.
obligated_funds_label: Enter obligated funds for Base CLIN
pop_end: 'Period of Performance (PoP) end date'
pop_start: 'Period of Performance (PoP) start date'
obligated_funds_label: Obligated Funds
pop_end: End Date
pop_start: Start Date
review_button: Review task order
supporting_docs_header: Upload your supporting documentation
supporting_docs_size_limit: Your file may not exceed 64MB