From 61cdbf7f62c99576ab56cd4c17e4a77f8a58cc4b Mon Sep 17 00:00:00 2001 From: Andrew Croce Date: Tue, 14 Aug 2018 16:27:58 -0400 Subject: [PATCH] Display "Response Required" label if no value --- styles/elements/_typography.scss | 6 +- templates/requests/screen-4.html | 111 ++++++++++++++++++------------- 2 files changed, 71 insertions(+), 46 deletions(-) diff --git a/styles/elements/_typography.scss b/styles/elements/_typography.scss index b1af1be1..a207c0a1 100644 --- a/styles/elements/_typography.scss +++ b/styles/elements/_typography.scss @@ -52,9 +52,13 @@ dl { } dd { -webkit-margin-start: 0; + + .label { + margin-left: 0; + } } > div { margin-bottom: $gap * 2; } -} \ No newline at end of file +} diff --git a/templates/requests/screen-4.html b/templates/requests/screen-4.html index add689ff..9e433ffd 100644 --- a/templates/requests/screen-4.html +++ b/templates/requests/screen-4.html @@ -1,7 +1,12 @@ +{% macro RequiredLabel() -%} + Response Required +{%- endmacro %} + {% extends 'requests_new.html' %} {% from "components/alert.html" import Alert %} {% from "components/text_input.html" import TextInput %} +{% from "components/icon.html" import Icon %} {% block subtitle %}

Review & Submit

@@ -14,172 +19,194 @@ {% block form %} - {% if f.errors %} - {{ Alert('There were some errors', - message="

Please complete all required fields before submitting.

", +

Before you can submit your request, please take a moment to review the information entered in the form. You may make changes by clicking the edit link on each section. When all information looks right, go ahead and submit.

+ + {% if f.errors or not can_submit%} + {{ Alert('Please complete all sections', + message="

In order to submit your JEDI Cloud request, you'll need to complete all required sections of this form without error. Missing or invalid fields are noted below.

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

Before you can submit your request, please take a moment to review the information entered in the form. You may make changes by clicking the edit link on each section. When all information looks right, go ahead and submit.

-

Details of Use Edit

+

+ Details of Use + + {{ Icon('edit') }} + Edit this section + +

DoD Component
-
{{data['details_of_use']['dod_component']}}
+
{{ data['details_of_use']['dod_component'] or RequiredLabel() }}
JEDI Usage
-
{{data['details_of_use']['jedi_usage']}}
+
{{ data['details_of_use']['jedi_usage'] or RequiredLabel() }}
Number of software systems
-
{{data['details_of_use']['num_software_systems']}}
+
{{ data['details_of_use']['num_software_systems'] or RequiredLabel() }}
JEDI Migration
-
{{data['details_of_use']['jedi_migration']}}
+
{{ data['details_of_use']['jedi_migration'] or RequiredLabel() }}
Rationalization of Software Systems
-
{{data['details_of_use']['rationalization_software_systems']}}
+
{{ data['details_of_use']['rationalization_software_systems'] or RequiredLabel() }}
Technical Support Team
-
{{data['details_of_use']['technical_support_team']}}
+
{{ data['details_of_use']['technical_support_team'] or RequiredLabel() }}
-
-
Organization Providing Assistance
-
{{data['details_of_use']['organization_providing_assistance']}}
-
+ + {% if data['details_of_use']['technical_support_team'] == 'yes' %} +
+
Organization Providing Assistance
+
{{ data['details_of_use']['organization_providing_assistance'] or RequiredLabel() }}
+
+ {% endif %}
Engineering Assessment
-
{{data['details_of_use']['engineering_assessment']}}
+
{{ data['details_of_use']['engineering_assessment'] or RequiredLabel() }}
Data Transfers
-
{{data['details_of_use']['data_transfers']}}
+
{{ data['details_of_use']['data_transfers'] or RequiredLabel() }}
Expected Completion Date
-
{{data['details_of_use']['expected_completion_date']}}
+
{{ data['details_of_use']['expected_completion_date'] or RequiredLabel() }}
Cloud Native
-
{{data['details_of_use']['cloud_native']}}
+
{{ data['details_of_use']['cloud_native'] or RequiredLabel() }}
Estimated Monthly Spend
-
{{data['details_of_use']['estimated_monthly_spend']}}
+
{{ data['details_of_use']['estimated_monthly_spend'] or RequiredLabel() }}
Total Spend
-
${{data['details_of_use']['dollar_value']}}
+
{{ data['details_of_use']['dollar_value'] or RequiredLabel() }}
Number of User Sessions
-
{{data['details_of_use']['number_user_sessions']}}
+
{{ data['details_of_use']['number_user_sessions'] or RequiredLabel() }}
Average Daily Traffic (Number of Requests)
-
{{data['details_of_use']['average_daily_traffic']}}
+
{{ data['details_of_use']['average_daily_traffic'] or RequiredLabel() }}
Average Daily Traffic (GB)
-
{{data['details_of_use']['average_daily_traffic_gb']}}
+
{{ data['details_of_use']['average_daily_traffic_gb'] or RequiredLabel() }}
Start Date
-
{{data['details_of_use']['start_date']}}
+
{{ data['details_of_use']['start_date'] or RequiredLabel() }}
-

Information About You Edit

+

+ Information About You + + {{ Icon('edit') }} + Edit this section + +

First Name
-
{{data['information_about_you']['fname_request']}}
+
{{ data['information_about_you']['fname_request'] or RequiredLabel() }}
Last Name
-
{{data['information_about_you']['lname_request']}}
+
{{ data['information_about_you']['lname_request'] or RequiredLabel() }}
Email Address
-
{{data['information_about_you']['email_request']}}
+
{{ data['information_about_you']['email_request'] or RequiredLabel() }}
Phone Number
-
{{data['information_about_you']['phone_number']}}
+
{{ data['information_about_you']['phone_number'] or RequiredLabel() }}
Service Branch or Agency
-
{{data['information_about_you']['service_branch']}}
+
{{ data['information_about_you']['service_branch'] or RequiredLabel() }}
Citizenship
-
{{data['information_about_you']['citizenship']}}
+
{{ data['information_about_you']['citizenship'] or RequiredLabel() }}
Designation of Person
-
{{data['information_about_you']['designation']}}
+
{{ data['information_about_you']['designation'] or RequiredLabel() }}
Latest Information Assurance (IA) Training completion date
-
{{data['information_about_you']['date_latest_training']}}
+
{{ data['information_about_you']['date_latest_training'] or RequiredLabel() }}
-

Primary Point of Contact Edit

+

+ Primary Point of Contact + + {{ Icon('edit') }} + Edit this section + +

POC First Name
-
{{data['primary_poc']['fname_poc']}}
+
{{ data['primary_poc']['fname_poc'] or RequiredLabel() }}
POC Last Name
-
{{data['primary_poc']['lname_poc']}}
+
{{ data['primary_poc']['lname_poc'] or RequiredLabel() }}
POC Email Address
-
{{data['primary_poc']['email_poc']}}
+
{{ data['primary_poc']['email_poc'] or RequiredLabel() }}
DOD ID
-
{{data['primary_poc']['dodid_poc']}}
+
{{ data['primary_poc']['dodid_poc'] or RequiredLabel() }}
@@ -188,12 +215,6 @@ {% endblock %} {% block next %} -{% if not can_submit %} - {{ Alert('There were some errors', - message="

Please complete all required fields before submitting.

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