Add some display pizzaz to the review and submit form

This commit is contained in:
Andrew Croce 2018-08-20 12:01:16 -04:00
parent b56bc232e6
commit 6b675afab9

View File

@ -8,6 +8,23 @@
{% from "components/text_input.html" import TextInput %} {% from "components/text_input.html" import TextInput %}
{% from "components/icon.html" import Icon %} {% from "components/icon.html" import Icon %}
{% set dod_component_choices = {
"null": "Select an option",
"us_air_force": "US Air Force",
"us_army": "US Army",
"us_navy": "US Navy",
"us_marine_corps": "US Marine Corps",
"joint_chiefs_of_staff": "Joint Chiefs of Staff"
} %}
{% set organization_providing_assistance_choices = {
"in_house_staff": "In-house staff",
"contractor": "Contractor",
"other_dod_organization": "Other DoD organization",
"none": "None"
} %}
{% block subtitle %} {% block subtitle %}
<h2>Review &amp; Submit</h2> <h2>Review &amp; Submit</h2>
{% endblock %} {% endblock %}
@ -40,7 +57,13 @@
<dl> <dl>
<div> <div>
<dt>DoD Component</dt> <dt>DoD Component</dt>
<dd>{{ data['details_of_use']['dod_component'] or RequiredLabel() }}</dd> <dd>
{% if data['details_of_use']['dod_component'] %}
{{ dod_component_choices[data['details_of_use']['dod_component']] }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div> </div>
@ -51,7 +74,13 @@
<div> <div>
<dt>Number of software systems</dt> <dt>Number of software systems</dt>
<dd>{{ data['details_of_use']['num_software_systems'] or RequiredLabel() }}</dd> <dd>
{% if data['details_of_use']['num_software_systems'] %}
{{ data['details_of_use']['num_software_systems'] | ReadableInteger }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div> </div>
<div> <div>
@ -72,62 +101,110 @@
{% if data['details_of_use']['technical_support_team'] == 'yes' %} {% if data['details_of_use']['technical_support_team'] == 'yes' %}
<div> <div>
<dt>Organization Providing Assistance</dt> <dt>Organization Providing Assistance</dt>
<dd>{{ data['details_of_use']['organization_providing_assistance'] or RequiredLabel() }}</dd> <dd>
{% if data['details_of_use']['organization_providing_assistance'] %}
{{ organization_providing_assistance_choices[data['details_of_use']['organization_providing_assistance']] }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div> </div>
{% endif %} {% endif %}
<div> <div>
<dt>Engineering Assessment</dt> <dt>Engineering Assessment</dt>
<dd>{{ data['details_of_use']['engineering_assessment'] or RequiredLabel() }}</dd> <dd>{{ data['details_of_use']['engineering_assessment'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Data Transfers</dt> <dt>Data Transfers</dt>
<dd>{{ data['details_of_use']['data_transfers'] or RequiredLabel() }}</dd> <dd>
</div> {% if data['details_of_use']['data_transfers'] %}
{{ data['details_of_use']['data_transfers'] | upper | replace("_"," ")}}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div>
<div> <div>
<dt>Expected Completion Date</dt> <dt>Expected Completion Date</dt>
<dd>{{ data['details_of_use']['expected_completion_date'] or RequiredLabel() }}</dd> <dd>
</div> {% if data['details_of_use']['expected_completion_date'] %}
{{ data['details_of_use']['expected_completion_date'] | replace("_"," ")}}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div>
{% else %} {% else %}
<div> <div>
<dt>Cloud Native</dt> <dt>Cloud Native</dt>
<dd>{{ data['details_of_use']['cloud_native'] or RequiredLabel() }}</dd> <dd>{{ data['details_of_use']['cloud_native'] or RequiredLabel() }}</dd>
</div> </div>
{% endif %} {% endif %}
<div> <div>
<dt>Estimated Monthly Spend</dt> <dt>Estimated Monthly Spend</dt>
<dd>{{ data['details_of_use']['estimated_monthly_spend'] or RequiredLabel() }}</dd> <dd>
{% if data['details_of_use']['estimated_monthly_spend'] %}
{{ data['details_of_use']['estimated_monthly_spend'] | USDollars }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div> </div>
<div> {% if (data['details_of_use']['estimated_monthly_spend'] and ((data['details_of_use']['estimated_monthly_spend'] * 12) > 1000000)) %}
<dt>Total Spend</dt> <div>
<dd>{{ data['details_of_use']['dollar_value'] or RequiredLabel() }}</dd> <dt>Total Spend</dt>
</div> <dd>
{% if data['details_of_use']['dollar_value'] %}
{{ data['details_of_use']['dollar_value'] | USDollars }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div>
<div> <div>
<dt>Number of User Sessions</dt> <dt>Number of User Sessions</dt>
<dd>{{ data['details_of_use']['number_user_sessions'] or RequiredLabel() }}</dd> <dd>
</div> {% if data['details_of_use']['number_user_sessions'] %}
{{ data['details_of_use']['number_user_sessions'] | ReadableInteger }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div>
<div> <div>
<dt>Average Daily Traffic (Number of Requests)</dt> <dt>Average Daily Traffic (Number of Requests)</dt>
<dd>{{ data['details_of_use']['average_daily_traffic'] or RequiredLabel() }}</dd> <dd>
</div> {% if data['details_of_use']['average_daily_traffic'] %}
{{ data['details_of_use']['average_daily_traffic'] | ReadableInteger }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div>
<div> <div>
<dt>Average Daily Traffic (GB)</dt> <dt>Average Daily Traffic (GB)</dt>
<dd>{{ data['details_of_use']['average_daily_traffic_gb'] or RequiredLabel() }}</dd> <dd>
</div> {% if data['details_of_use']['average_daily_traffic_gb'] %}
{{ data['details_of_use']['average_daily_traffic_gb'] | ReadableInteger }} GB
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div>
{% endif %}
<div> <div>
<dt>Start Date</dt> <dt>Start Date</dt>
@ -162,7 +239,13 @@
<div> <div>
<dt>Phone Number</dt> <dt>Phone Number</dt>
<dd>{{ data['information_about_you']['phone_number'] or RequiredLabel() }}</dd> <dd>
{% if data['information_about_you']['phone_number'] %}
{{ data['information_about_you']['phone_number'] | USPhone }}
{% else %}
{{ RequiredLabel() }}
{% endif %}
</dd>
</div> </div>
<div> <div>