diff --git a/atst/forms/task_order.py b/atst/forms/task_order.py index 7473eba1..0376e32d 100644 --- a/atst/forms/task_order.py +++ b/atst/forms/task_order.py @@ -8,11 +8,11 @@ from wtforms.fields import ( TextAreaField, FileField, ) -from wtforms.fields.html5 import DateField +from wtforms.fields.html5 import DateField, TelField from wtforms.widgets import ListWidget, CheckboxInput from wtforms.validators import Required, Length -from atst.forms.validators import IsNumber +from atst.forms.validators import IsNumber, PhoneNumber from .forms import CacheableForm from .data import ( @@ -98,7 +98,7 @@ class FundingForm(CacheableForm): class UnclassifiedFundingForm(FundingForm): clin_02 = IntegerField(translate("forms.task_order.unclassified_clin_02_label")) - clin_04 = IntegerField(translate("forms.task_order.unclassified_clin_04_label") + clin_04 = IntegerField(translate("forms.task_order.unclassified_clin_04_label")) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) @@ -107,52 +107,56 @@ class UnclassifiedFundingForm(FundingForm): class OversightForm(CacheableForm): - ko_first_name = StringField("First Name") - ko_last_name = StringField("Last Name") - ko_email = StringField("Email") + ko_first_name = StringField( + translate("forms.task_order.oversight_first_name_label") + ) + ko_last_name = StringField(translate("forms.task_order.oversight_last_name_label")) + ko_email = StringField(translate("forms.task_order.oversight_email_label")) + ko_phone = TelField( + translate("forms.task_order.oversight_phone_label"), validators=[PhoneNumber()] + ) ko_dod_id = StringField( - "DOD ID", validators=[Required(), Length(min=10), IsNumber()] + translate("forms.task_order.oversight_dod_id_label"), + validators=[Required(), Length(min=10), IsNumber()], ) - cor_first_name = StringField("First Name") - cor_last_name = StringField("Last Name") - cor_email = StringField("Email") + cor_first_name = StringField( + translate("forms.task_order.oversight_first_name_label") + ) + cor_last_name = StringField(translate("forms.task_order.oversight_last_name_label")) + cor_email = StringField(translate("forms.task_order.oversight_email_label")) + cor_phone = TelField( + translate("forms.task_order.oversight_phone_label"), validators=[PhoneNumber()] + ) cor_dod_id = StringField( - "DOD ID", validators=[Required(), Length(min=10), IsNumber()] + translate("forms.task_order.oversight_dod_id_label"), + validators=[Required(), Length(min=10), IsNumber()], ) - so_first_name = StringField("First Name") - so_last_name = StringField("Last Name") - so_email = StringField("Email") + so_first_name = StringField( + translate("forms.task_order.oversight_first_name_label") + ) + so_last_name = StringField(translate("forms.task_order.oversight_last_name_label")) + so_email = StringField(translate("forms.task_order.oversight_email_label")) + so_phone = TelField( + translate("forms.task_order.oversight_phone_label"), validators=[PhoneNumber()] + ) so_dod_id = StringField( - "DOD ID", validators=[Required(), Length(min=10), IsNumber()] + translate("forms.task_order.oversight_dod_id_label"), + validators=[Required(), Length(min=10), IsNumber()], ) ko_invite = BooleanField( - "Invite KO to Task Order Builder", - description=""" - Your KO will need to approve funding for this Task Order by logging - into the JEDI Cloud Portal, submitting the Task Order documents - within their official system of record, and electronically signing. - You may choose to skip this for now and invite them later. - """, + translate("forms.task_order.ko_invite_label"), + description=translate("forms.task_order.skip_invite_description"), ) cor_invite = BooleanField( - "Invite COR to Task Order Builder", - description=""" - Your COR may assist with submitting the Task Order documents within - their official system of record. You may choose to skip this for - now and invite them later. - """, + translate("forms.task_order.cor_invite_label"), + description=translate("forms.task_order.skip_invite_description"), ) so_invite = BooleanField( - "Invite Security Officer to Task Order Builder", - description=""" - Your Security Officer will need to answer some security - configuration questions in order to generate a DD-254 document, - then electronically sign. You may choose to skip this for now - and invite them later. - """, + translate("forms.task_order.so_invite_label"), + description=translate("forms.task_order.skip_invite_description"), ) diff --git a/templates/components/text_input.html b/templates/components/text_input.html index e34fe429..5a0214d8 100644 --- a/templates/components/text_input.html +++ b/templates/components/text_input.html @@ -6,6 +6,7 @@ label=field.label | striptags, description=field.description, tooltip='', + tooltip_title='Help', placeholder='', validation='anything', paragraph=False, @@ -30,7 +31,7 @@ {{ label }} - {% if tooltip %}{{ Tooltip(tooltip) }}{% endif %} + {% if tooltip %}{{ Tooltip(tooltip, tooltip_title) }}{% endif %} {% if field.description %} diff --git a/templates/components/user_info.html b/templates/components/user_info.html index 244c7e0d..cd5e8c6e 100644 --- a/templates/components/user_info.html +++ b/templates/components/user_info.html @@ -1,6 +1,6 @@ {% from "components/text_input.html" import TextInput %} -{% macro UserInfo(first_name, last_name, email, dod_id) -%} +{% macro UserInfo(first_name, last_name, email, phone) -%} {{ TextInput(first_name) }} @@ -17,7 +17,7 @@ - {{ TextInput(dod_id, placeholder='1234567890', validation='dodId') }} + {{ TextInput(phone, placeholder='(123) 456-7890', validation='usPhone') }} {% endmacro %} diff --git a/templates/task_orders/new/oversight.html b/templates/task_orders/new/oversight.html index 102d1c84..fc0c9311 100644 --- a/templates/task_orders/new/oversight.html +++ b/templates/task_orders/new/oversight.html @@ -2,24 +2,51 @@ {% from "components/user_info.html" import UserInfo %} {% from "components/checkbox_input.html" import CheckboxInput %} +{% from "components/text_input.html" import TextInput %} {% block heading %} - Oversight + {{ "task_orders.new.oversight.section_title" | translate }} {% endblock %} {% block form %} -Contracting Officer (KO) Information -{{ UserInfo(form.ko_first_name, form.ko_last_name, form.ko_email, form.ko_dod_id) }} +{{ "task_orders.new.oversight.ko_info_title" | translate }} +{{ "task_orders.new.oversight.ko_info_paragraph" | translate }} + + + + + {{ "task_orders.new.oversight.skip_ko_label" | translate }} + + + +{{ UserInfo(form.ko_first_name, form.ko_last_name, form.ko_email, form.ko_phone) }} {{ CheckboxInput(form.ko_invite) }} +{{ TextInput(form.ko_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why')}} -Contractive Officer Representative (COR) Information -{{ UserInfo(form.cor_first_name, form.cor_last_name, form.cor_email, form.cor_dod_id) }} + + +{{ "task_orders.new.oversight.cor_info_title" | translate }} +{{ "task_orders.new.oversight.cor_info_paragraph" | translate }} + + + + + {{ "task_orders.new.oversight.am_cor_label" | translate }} + + + +{{ UserInfo(form.cor_first_name, form.cor_last_name, form.cor_email, form.cor_phone) }} {{ CheckboxInput(form.cor_invite) }} +{{ TextInput(form.cor_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why')}} -Security Officer Information -{{ UserInfo(form.so_first_name, form.so_last_name, form.so_email, form.so_dod_id) }} + + +{{ "task_orders.new.oversight.so_info_title" | translate }} +{{ "task_orders.new.oversight.so_info_paragraph" | translate }} +{{ UserInfo(form.so_first_name, form.so_last_name, form.so_email, form.so_phone) }} {{ CheckboxInput(form.so_invite) }} +{{ TextInput(form.so_dod_id, placeholder="1234567890", tooltip="Why", tooltip_title='Why')}} {% endblock %} diff --git a/translations.yaml b/translations.yaml index 3fc7d46d..989cb7fe 100644 --- a/translations.yaml +++ b/translations.yaml @@ -186,12 +186,22 @@ forms: end_date_label: End Date csp_cost_est_label: Upload a copy of your CSP Cost Estimate Research csp_cost_est_description: Upload a PDF or screenshot fo your usage estimate from the calculator. - clin_01_label: 'CLIN 01 : Unclassifie'd + clin_01_label: 'CLIN 01 : Unclassified' clin_02_label: 'CLIN 02: Classified' clin_03_label: 'CLIN 03: Unclassified' clin_04_label: 'CLIN 04: Classified' unclassified_clin_02_label: 'CLIN 02: Classified (available soon)' unclassified_clin_04_label: 'CLIN 04: Classified (available soon)' + oversight_first_name_label: First Name + oversight_last_name_label: Last Name + oversight_email_label: Email + oversight_phone_label: Phone Number + oversight_dod_id_label: DoD ID + ko_invite_label: Invite KO to Task Order Builder + cor_invite_label: Invite COR to Task Order Builder + so_invite_label: Invite Security Officer to Task Order Builder + skip_invite_description: | + You may choose to skip this for now and invite them later. validators: is_number_message: Please enter a valid number. list_item_required_message: Please provide at least one. @@ -363,6 +373,16 @@ task_orders: support_assistance_title: Cloud Support and Assistance support_assistance_paragraph: Technical guidance from the cloud service provider, including architecture, configuration of IaaS and PaaS, integration, troubleshooting assistance, and other services. total: 'Total Task Order Value:' + oversight: + section_title: Oversight + ko_info_title: Contracting Officer (KO) Information + ko_info_paragraph: Your KO will need to approve funding for this Task Order by loggin into the JEDI Cloud Portal, submitting the Task Order documents within their official system of record, and electronically signing. You might want to work with your program Financial Manager to get your TO documents moving in the right dirction. + skip_ko_label: "Skip for now (We'll remind you to enter one later)" + cor_info_title: Contractive Officer Representative (COR) Information + cor_info_paragraph: Your COR may assist in submitting the Task Order documents within thier official system of record. They may also be invited to log in an manage the Task Order entry within the JEDI Cloud portal. + am_cor_label: I am the Contracting Officer Representative (COR) for this Task Order + so_info_title: Security Officer Information + so_info_paragraph: our Security Officer will need to answer some security configuration questions in order to generate a DD-254 document, then electronically sign. testing: example_string: Hello World example_with_variables: 'Hello, {name}!'
{{ "task_orders.new.oversight.ko_info_paragraph" | translate }}
{{ "task_orders.new.oversight.cor_info_paragraph" | translate }}
{{ "task_orders.new.oversight.so_info_paragraph" | translate }}