Merge pull request #176 from dod-ccpo/ui/review-and-submit

Ui/review and submit
This commit is contained in:
patricksmithdds 2018-08-15 10:17:28 -04:00 committed by GitHub
commit 56291526da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 97 additions and 65 deletions

View File

@ -86,7 +86,7 @@ class JEDIRequestFlow(object):
elif self.form_section == "information_about_you": elif self.form_section == "information_about_you":
data = self.map_user_data(self.current_user) data = self.map_user_data(self.current_user)
return defaultdict(lambda: defaultdict(lambda: "Input required"), data) return defaultdict(lambda: defaultdict(lambda: None), data)
@property @property
def can_submit(self): def can_submit(self):

View File

@ -52,6 +52,10 @@ dl {
} }
dd { dd {
-webkit-margin-start: 0; -webkit-margin-start: 0;
.label {
margin-left: 0;
}
} }
> div { > div {

View File

@ -1,7 +1,12 @@
{% macro RequiredLabel() -%}
<span class='label label--error'>Response Required</span>
{%- endmacro %}
{% extends 'requests_new.html' %} {% extends 'requests_new.html' %}
{% from "components/alert.html" import Alert %} {% from "components/alert.html" import Alert %}
{% from "components/text_input.html" import TextInput %} {% from "components/text_input.html" import TextInput %}
{% from "components/icon.html" import Icon %}
{% block subtitle %} {% block subtitle %}
<h2>Review &amp; Submit</h2> <h2>Review &amp; Submit</h2>
@ -14,172 +19,201 @@
{% block form %} {% block form %}
{% if f.errors %} <p>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.</p>
{{ Alert('There were some errors',
message="<p>Please complete all required fields before submitting.</p>", {% if f.errors or not can_submit%}
{{ Alert('Please complete all sections',
message="<p>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.</p>",
level='error' level='error'
) }} ) }}
{% endif %} {% endif %}
<p>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.</p>
<h2>Details of Use <a href="{{ url_for('requests.requests_form_update', screen=1, request_id=request_id) }}" class="icon-link">Edit</a></h2> <h2>
Details of Use
<a href="{{ url_for('requests.requests_form_update', screen=1, request_id=request_id) }}" class="icon-link">
{{ Icon('edit') }}
<span>Edit this section</span>
</a>
</h2>
<dl> <dl>
<div> <div>
<dt>DoD Component</dt> <dt>DoD Component</dt>
<dd>{{data['details_of_use']['dod_component']}}</dd> <dd>{{ data['details_of_use']['dod_component'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>JEDI Usage</dt> <dt>JEDI Usage</dt>
<dd>{{data['details_of_use']['jedi_usage']}}</dd> <dd>{{ data['details_of_use']['jedi_usage'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Number of software systems</dt> <dt>Number of software systems</dt>
<dd>{{data['details_of_use']['num_software_systems']}}</dd> <dd>{{ data['details_of_use']['num_software_systems'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>JEDI Migration</dt> <dt>JEDI Migration</dt>
<dd>{{data['details_of_use']['jedi_migration']}}</dd> <dd>{{ data['details_of_use']['jedi_migration'] or RequiredLabel() }}</dd>
</div> </div>
{% if data['details_of_use']['jedi_migration'] == 'yes' %}
<div> <div>
<dt>Rationalization of Software Systems</dt> <dt>Rationalization of Software Systems</dt>
<dd>{{data['details_of_use']['rationalization_software_systems']}}</dd> <dd>{{ data['details_of_use']['rationalization_software_systems'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Technical Support Team</dt> <dt>Technical Support Team</dt>
<dd>{{data['details_of_use']['technical_support_team']}}</dd> <dd>{{ data['details_of_use']['technical_support_team'] or RequiredLabel() }}</dd>
</div> </div>
{% 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']}}</dd> <dd>{{ data['details_of_use']['organization_providing_assistance'] or RequiredLabel() }}</dd>
</div> </div>
{% endif %}
<div> <div>
<dt>Engineering Assessment</dt> <dt>Engineering Assessment</dt>
<dd>{{data['details_of_use']['engineering_assessment']}}</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']}}</dd> <dd>{{ data['details_of_use']['data_transfers'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Expected Completion Date</dt> <dt>Expected Completion Date</dt>
<dd>{{data['details_of_use']['expected_completion_date']}}</dd> <dd>{{ data['details_of_use']['expected_completion_date'] or RequiredLabel() }}</dd>
</div> </div>
{% else %}
<div> <div>
<dt>Cloud Native</dt> <dt>Cloud Native</dt>
<dd>{{data['details_of_use']['cloud_native']}}</dd> <dd>{{ data['details_of_use']['cloud_native'] or RequiredLabel() }}</dd>
</div> </div>
{% endif %}
<div> <div>
<dt>Estimated Monthly Spend</dt> <dt>Estimated Monthly Spend</dt>
<dd>{{data['details_of_use']['estimated_monthly_spend']}}</dd> <dd>{{ data['details_of_use']['estimated_monthly_spend'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Total Spend</dt> <dt>Total Spend</dt>
<dd>${{data['details_of_use']['dollar_value']}}</dd> <dd>{{ data['details_of_use']['dollar_value'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Number of User Sessions</dt> <dt>Number of User Sessions</dt>
<dd>{{data['details_of_use']['number_user_sessions']}}</dd> <dd>{{ data['details_of_use']['number_user_sessions'] or RequiredLabel() }}</dd>
</div> </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']}}</dd> <dd>{{ data['details_of_use']['average_daily_traffic'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Average Daily Traffic (GB)</dt> <dt>Average Daily Traffic (GB)</dt>
<dd>{{data['details_of_use']['average_daily_traffic_gb']}}</dd> <dd>{{ data['details_of_use']['average_daily_traffic_gb'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Start Date</dt> <dt>Start Date</dt>
<dd>{{data['details_of_use']['start_date']}}</dd> <dd>{{ data['details_of_use']['start_date'] or RequiredLabel() }}</dd>
</div> </div>
</dl> </dl>
<h2>Information About You <a href="{{ url_for('requests.requests_form_update', screen=2, request_id=request_id) }}" class="icon-link">Edit</a></h2> <h2>
Information About You
<a href="{{ url_for('requests.requests_form_update', screen=2, request_id=request_id) }}" class="icon-link">
{{ Icon('edit') }}
<span>Edit this section</span>
</a>
</h2>
<dl> <dl>
<div> <div>
<dt>First Name</dt> <dt>First Name</dt>
<dd>{{data['information_about_you']['fname_request']}}</dd> <dd>{{ data['information_about_you']['fname_request'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Last Name</dt> <dt>Last Name</dt>
<dd>{{data['information_about_you']['lname_request']}}</dd> <dd>{{ data['information_about_you']['lname_request'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Email Address</dt> <dt>Email Address</dt>
<dd>{{data['information_about_you']['email_request']}}</dd> <dd>{{ data['information_about_you']['email_request'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Phone Number</dt> <dt>Phone Number</dt>
<dd>{{data['information_about_you']['phone_number']}}</dd> <dd>{{ data['information_about_you']['phone_number'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Service Branch or Agency</dt> <dt>Service Branch or Agency</dt>
<dd>{{data['information_about_you']['service_branch']}}</dd> <dd>{{ data['information_about_you']['service_branch'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Citizenship</dt> <dt>Citizenship</dt>
<dd>{{data['information_about_you']['citizenship']}}</dd> <dd>{{ data['information_about_you']['citizenship'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Designation of Person</dt> <dt>Designation of Person</dt>
<dd>{{data['information_about_you']['designation']}}</dd> <dd>{{ data['information_about_you']['designation'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>Latest Information Assurance (IA) Training completion date</dt> <dt>Latest Information Assurance (IA) Training completion date</dt>
<dd>{{data['information_about_you']['date_latest_training']}}</dd> <dd>{{ data['information_about_you']['date_latest_training'] or RequiredLabel() }}</dd>
</div> </div>
</dl> </dl>
<h2>Primary Point of Contact <a href="{{ url_for('requests.requests_form_update', screen=3, request_id=request_id) }}" class="icon-link">Edit</a></h2> <h2>
Primary Point of Contact
<a href="{{ url_for('requests.requests_form_update', screen=3, request_id=request_id) }}" class="icon-link">
{{ Icon('edit') }}
<span>Edit this section</span>
</a>
</h2>
<dl> <dl>
<div> <div>
<dt>POC First Name</dt> <dt>POC First Name</dt>
<dd>{{data['primary_poc']['fname_poc']}}</dd> <dd>{{ data['primary_poc']['fname_poc'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>POC Last Name</dt> <dt>POC Last Name</dt>
<dd>{{data['primary_poc']['lname_poc']}}</dd> <dd>{{ data['primary_poc']['lname_poc'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>POC Email Address</dt> <dt>POC Email Address</dt>
<dd>{{data['primary_poc']['email_poc']}}</dd> <dd>{{ data['primary_poc']['email_poc'] or RequiredLabel() }}</dd>
</div> </div>
<div> <div>
<dt>DOD ID</dt> <dt>DOD ID</dt>
<dd>{{data['primary_poc']['dodid_poc']}}</dd> <dd>{{ data['primary_poc']['dodid_poc'] or RequiredLabel() }}</dd>
</div> </div>
</dl> </dl>
@ -188,12 +222,6 @@
{% endblock %} {% endblock %}
{% block next %} {% block next %}
{% if not can_submit %}
{{ Alert('There were some errors',
message="<p>Please complete all required fields before submitting.</p>",
level='error'
) }}
{% endif %}
<div class='action-group'> <div class='action-group'>
<input type='submit' class='usa-button usa-button-primary' value='Submit' {{ "disabled" if not can_submit else "" }} /> <input type='submit' class='usa-button usa-button-primary' value='Submit' {{ "disabled" if not can_submit else "" }} />