diff --git a/atst/forms/financial.py b/atst/forms/financial.py index 9f4afbb3..c3e00578 100644 --- a/atst/forms/financial.py +++ b/atst/forms/financial.py @@ -101,46 +101,43 @@ class BaseFinancialForm(ValidatedForm): ) uii_ids = NewlineListField( - "Unique Item Identifier (UII)s related to your application(s) if you already have them", + "Unique Item Identifier (UII)s related to your application(s) if you already have them.", + description="If you have more than one UII, place each one on a new line.", validators=[Required()], ) pe_id = StringField( - "Program Element (PE) Number related to your request", validators=[Required()] + "Program Element Number", + description="PE numbers help the Department of Defense identify which offices' budgets are contributing towards this resource use.
It should be 7 digits followed by 1-3 letters, and should have a zero as the first and third digits.", + validators=[Required()], ) treasury_code = StringField( - "Program Treasury Code", validators=[Required(), Regexp(TREASURY_CODE_REGEX)] + "Program Treasury Code", + description="Program Treasury Code (or Appropriations Code) identifies resource types.
It should be a four digit or six digit number, optionally prefixed by one or more zeros.", + validators=[Required(), Regexp(TREASURY_CODE_REGEX)], ) ba_code = StringField( "Program Budget Activity (BA) Code", + description="BA Code is used to identify the purposes, projects, or types of activities financed by the appropriation fund.
It should be two digits, followed by a letter.", validators=[Required(), Regexp(BA_CODE_REGEX)], ) - fname_co = StringField("Contracting Officer First Name", validators=[Required()]) - lname_co = StringField("Contracting Officer Last Name", validators=[Required()]) + fname_co = StringField("KO First Name", validators=[Required()]) + lname_co = StringField("KO Last Name", validators=[Required()]) - email_co = EmailField("Contracting Officer Email", validators=[Required(), Email()]) + email_co = EmailField("KO Email", validators=[Required(), Email()]) - office_co = StringField("Contracting Officer Office", validators=[Required()]) + office_co = StringField("KO Office", validators=[Required()]) - fname_cor = StringField( - "Contracting Officer Representative (COR) First Name", validators=[Required()] - ) + fname_cor = StringField("COR First Name", validators=[Required()]) - lname_cor = StringField( - "Contracting Officer Representative (COR) Last Name", validators=[Required()] - ) + lname_cor = StringField("COR Last Name", validators=[Required()]) - email_cor = EmailField( - "Contracting Officer Representative (COR) Email", - validators=[Required(), Email()], - ) + email_cor = EmailField("COR Email", validators=[Required(), Email()]) - office_cor = StringField( - "Contracting Officer Representative (COR) Office", validators=[Required()] - ) + office_cor = StringField("COR Office", validators=[Required()]) class FinancialForm(BaseFinancialForm): diff --git a/js/lib/input_validations.js b/js/lib/input_validations.js index 3806af8c..d326d0b8 100644 --- a/js/lib/input_validations.js +++ b/js/lib/input_validations.js @@ -52,5 +52,31 @@ export default { match: /^\d{10}$/, unmask: [], validationError: 'Please enter a 10-digit DoD ID number' + }, + peNumber: { + mask: val => { + if (val.length <= 7) return [/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/[a-z,A-Z]/] + if (val.length === 8) return [/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/[a-z,A-Z]/,/[a-z,A-Z]/] + return [/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/\d/,/[a-z,A-Z]/,/[a-z,A-Z]/,/[a-z,A-Z]/] + }, + match: /(0\d)(0\d)(\d)(\d{2})([a-z,A-Z]{1,3})/, + unmask: ['_'], + validationError: 'Please enter a valid PE number. Note that it should be 7 digits followed by 1-3 letters, and should have a zero as the first and third digits.' + }, + treasuryCode: { + mask: createNumberMask({ prefix: '', allowDecimal: false, allowLeadingZeroes: true, includeThousandsSeparator: false }), + match: /^0*([1-9]{4}|[1-9]{6})$/, + unmask: [], + validationError: 'Please enter a valid Program Treasury Code. Note that it should be a four digit or six digit number, optionally prefixed by one or more zeros.' + }, + baCode: { + mask: val => { + if (val.length === 1) return [/\d/] + if (val.length === 2) return [/\d/, /\d/] + return [/\d/,/\d/,/[a-z,A-Z]/] + }, + match: /[0-9]{2}\w?$/, + unmask: [], + validationError: 'Please enter a valid BA Code. Note that it should be two digits, followed by a letter.' } } diff --git a/styles/components/_forms.scss b/styles/components/_forms.scss index 6bfd17d2..db7ee296 100644 --- a/styles/components/_forms.scss +++ b/styles/components/_forms.scss @@ -21,11 +21,35 @@ @include media($medium-screen) { @include grid-row; align-items: flex-start; + justify-content: flex-start; .form-col { + &.form-col--half { + flex-basis: 50%; + } + + &.form-col--third { + flex-basis: 33.33%; + } + + &.form-col--two-thirds { + flex-basis: 66.66%; + } + .usa-input { margin-left: ($gap * 4); margin-right: ($gap * 4); + + label { + .icon-validation { + left: auto; + right: -$gap * 3; + } + } + + input { + max-width: none; + } } &:first-child { diff --git a/styles/elements/_inputs.scss b/styles/elements/_inputs.scss index 9c664cdd..84167345 100644 --- a/styles/elements/_inputs.scss +++ b/styles/elements/_inputs.scss @@ -93,14 +93,14 @@ .icon-tooltip { padding: 0 $gap/2; cursor: default; - margin-left: $gap/2; + margin: 0 0 0 ($gap / 2); } } .usa-input__help { - @include h4; + @include h5; font-weight: normal; - padding: $gap/2 0; + @include line-max; .icon-link { @@ -115,7 +115,6 @@ @include line-max; margin: 0; box-sizing: border-box; - max-width: 32em; resize: none; &::placeholder { @@ -215,7 +214,9 @@ &--integer, &--dollars, - &--gigabytes, { + &--gigabytes, + &--treasuryCode, + &--peNumber { input { max-width: 16em; } @@ -225,7 +226,8 @@ } &--date, - &--usPhone { + &--usPhone, + &--baCode { input { max-width: 10em; } diff --git a/templates/requests/financial_verification.html b/templates/requests/financial_verification.html index 51eeccba..c43942ef 100644 --- a/templates/requests/financial_verification.html +++ b/templates/requests/financial_verification.html @@ -27,6 +27,25 @@ ) }} {% endif %} + {% block form_action %} + {% if extended %} +
+ {% else %} + + {% endif %} + {% endblock %} + + {{ f.csrf_token }} + {% block form %} + {% autoescape false %} + + {% if f.errors %} + {{ Alert('There were some errors', + message="

Please see below.

", + level='error' + ) }} + {% endif %} +
@@ -36,27 +55,10 @@
- {% block form_action %} - {% if extended %} - - {% else %} - - {% endif %} - {% endblock %} - - {{ f.csrf_token }} - {% block form %} - {% autoescape false %} - - {% if f.errors %} - {{ Alert('There were some errors', - message="

Please see below.

", - level='error' - ) }} - {% endif %} -

In order to get you access to the JEDI Cloud, we will need you to enter the details below that will help us verify and account for your Task Order.

+
+ {% if extended %}
{{ OptionsInput(f.funding_type) }} @@ -66,33 +68,33 @@ {{ TextInput( - f.clin_0001,placeholder="50,000", - validation='integer' + f.clin_0001, + validation='dollars' ) }} {{ TextInput( - f.clin_0003,placeholder="13,000", - validation='integer' + f.clin_0003, + validation='dollars' ) }} {{ TextInput( - f.clin_1001,placeholder="30,000", - validation='integer' + f.clin_1001, + validation='dollars' ) }} {{ TextInput( - f.clin_1003,placeholder="7,000", - validation='integer' + f.clin_1003, + validation='dollars' ) }} {{ TextInput( - f.clin_2001,placeholder="30,000", - validation='integer' + f.clin_2001, + validation='dollars' ) }} {{ TextInput( - f.clin_2003,placeholder="7,000", - validation='integer' + f.clin_2003, + validation='dollars' ) }}
@@ -114,54 +116,60 @@ {{ TextInput(f.uii_ids, paragraph=True, - placeholder="e.g.: DI 0CVA5786950 \nUN1945326361234786950", + 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.
Not all applications have an existing UII number assigned." ) }} {{ TextInput(f.pe_id, - placeholder="e.g.: 0302400A", - tooltip="Program Element numbers helps the Department of Defense identify which offices\\' budgets are contributing towards this resource use." + placeholder="e.g.: 0105688F", + validation="peNumber" ) }} - {{ TextInput(f.treasury_code,placeholder="e.g.: 00123456") }} + {{ TextInput(f.treasury_code,placeholder="e.g.: 00123456",validation="treasuryCode") }} - {{ TextInput(f.ba_code,placeholder="e.g.: 02A") }} + {{ TextInput(f.ba_code,placeholder="e.g.: 02A",validation="baCode") }} + +

Contracting Officer (KO) Information

- {{ TextInput(f.fname_co,placeholder="Contracting Officer First Name") }} - {{ TextInput(f.lname_co,placeholder="Contracting Officer Last Name") }} - - {{ TextInput( - f.email_co,validation='email', - placeholder="jane@mail.mil" - ) }} - - {{ TextInput( - f.office_co, - placeholder="e.g.: WHS" - ) }} +
+
{{ TextInput(f.fname_co) }}
+
{{ TextInput(f.lname_co) }}
+
+
+
{{ TextInput(f.email_co,validation='email', placeholder='e.g. jane@mail.mil') }}
+
{{ TextInput(f.office_co,placeholder="e.g.: WHS") }}
+
+

Contracting Officer Representative (COR) Information

- {{ TextInput(f.fname_cor,placeholder="Contracting Officer Representative First Name") }} +
+
{{ TextInput(f.fname_cor) }}
+
{{ TextInput(f.lname_cor) }}
+
- {{ TextInput(f.lname_cor,placeholder="Contracting Officer Representative Last Name") }} - - {{ TextInput(f.email_cor,validation='email',placeholder="jane@mail.mil") }} - - {{ TextInput(f.office_cor,placeholder="e.g.: WHS") }} +
+
{{ TextInput(f.email_cor,validation='email', placeholder='e.g. jane@mail.mil') }}
+
{{ TextInput(f.office_cor,placeholder="e.g.: WHS") }}
+
{% endautoescape %} - {% endblock form %} - {% block next %} - - {% endblock %} - +
+ + {% endblock form %} + {% block next %} +
+ +
+ {% endblock %} + +
diff --git a/templates/requests/screen-2.html b/templates/requests/screen-2.html index 6d23c171..52395767 100644 --- a/templates/requests/screen-2.html +++ b/templates/requests/screen-2.html @@ -20,10 +20,15 @@

Please tell us more about you.

-{{ TextInput(f.fname_request, placeholder='First Name') }} -{{ TextInput(f.lname_request, placeholder='Last Name') }} -{{ TextInput(f.email_request, placeholder='jane@mail.mil', validation='email') }} -{{ TextInput(f.phone_number, placeholder='e.g. (123) 456-7890', validation='usPhone') }} +
+
{{ TextInput(f.fname_request) }}
+
{{ TextInput(f.lname_request) }}
+
+ +
+
{{ TextInput(f.email_request, placeholder='e.g. jane@mail.mil', validation='email') }}
+
{{ TextInput(f.phone_number, placeholder='e.g. (123) 456-7890', validation='usPhone') }}
+

We want to collect the following information from you for security auditing and determining priviledged user access.

diff --git a/templates/requests/screen-3.html b/templates/requests/screen-3.html index cbceccae..61b370d3 100644 --- a/templates/requests/screen-3.html +++ b/templates/requests/screen-3.html @@ -36,10 +36,17 @@ {{ CheckboxInput(f.am_poc) }}