From 6c2f2a131c302beed47cd563861acb8e579d4f79 Mon Sep 17 00:00:00 2001 From: luis cielak Date: Wed, 29 Aug 2018 11:17:43 -0400 Subject: [PATCH 1/7] Convert torando template to jinja --- ...approval.html.to => request_approval.html} | 10 +- yarn.lock | 97 +++---------------- 2 files changed, 17 insertions(+), 90 deletions(-) rename templates/{request_approval.html.to => request_approval.html} (96%) diff --git a/templates/request_approval.html.to b/templates/request_approval.html similarity index 96% rename from templates/request_approval.html.to rename to templates/request_approval.html index 142a1951..da5622e0 100644 --- a/templates/request_approval.html.to +++ b/templates/request_approval.html @@ -1,9 +1,10 @@ -{% extends "base.html.to" %} +{% extends "base.html" %} + +{% from "components/icon.html" import Icon %} {% block content %}
- {# A {% module Alert() %} goes here, if alerting be needed #}
@@ -129,7 +130,6 @@

Here is some good text explaining what the CCPO needs to do in order to approve the request. This text should also explain why we are asking for multiple people's names and the risk of boiling the ocean.

- {# All instances of .usa-input groups here should be replaced with {% module TextInput(wtforms.fields.Field) %} #}
-{% end %} +{% endblock %} diff --git a/yarn.lock b/yarn.lock index babfa828..e28aa0e0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -65,7 +65,7 @@ ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^5.1.0, ajv@^5.3.0: +ajv@^5.1.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" dependencies: @@ -276,10 +276,6 @@ aws4@^1.2.1, aws4@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" -aws4@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" - babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -1035,15 +1031,7 @@ browserslist@^3.2.6: caniuse-lite "^1.0.30000844" electron-to-chromium "^1.3.47" -browserslist@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.0.1.tgz#61c05ce2a5843c7d96166408bc23d58b5416e818" - dependencies: - caniuse-lite "^1.0.30000865" - electron-to-chromium "^1.3.52" - node-releases "^1.0.0-alpha.10" - -browserslist@^4.0.2: +browserslist@^4.0.0, browserslist@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.0.2.tgz#294388f5844bb3ab15ef7394ca17f49bf7a4e6f1" dependencies: @@ -1195,11 +1183,7 @@ caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: version "1.0.30000872" resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000872.tgz#3f6e53b63d373768bf99e896133d66ef89c49999" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000865: - version "1.0.30000865" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000865.tgz#70026616e8afe6e1442f8bb4e1092987d81a2f25" - -caniuse-lite@^1.0.30000876, caniuse-lite@^1.0.30000878: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000844, caniuse-lite@^1.0.30000876, caniuse-lite@^1.0.30000878: version "1.0.30000878" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000878.tgz#c644c39588dd42d3498e952234c372e5a40a4123" @@ -1450,7 +1434,7 @@ combine-source-map@^0.8.0, combine-source-map@~0.8.0: lodash.memoize "~3.0.3" source-map "~0.5.3" -combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5, combined-stream@~1.0.6: +combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" dependencies: @@ -2079,11 +2063,7 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" -electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.52: - version "1.3.55" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.55.tgz#f150e10b20b77d9d41afcca312efe0c3b1a7fdce" - -electron-to-chromium@^1.3.57: +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47, electron-to-chromium@^1.3.57: version "1.3.59" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.59.tgz#6377db04d8d3991d6286c72ed5c3fde6f4aaf112" @@ -2262,7 +2242,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.0, extend@~3.0.1, extend@~3.0.2: +extend@~3.0.0, extend@~3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -2380,7 +2360,7 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" -form-data@~2.3.1, form-data@~2.3.2: +form-data@~2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" dependencies: @@ -2630,13 +2610,6 @@ har-validator@~5.0.3: ajv "^5.1.0" har-schema "^2.0.0" -har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" - dependencies: - ajv "^5.3.0" - har-schema "^2.0.0" - has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" @@ -3702,7 +3675,7 @@ mime-db@~1.35.0: version "1.35.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" -mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.7: +mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.7: version "2.1.19" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" dependencies: @@ -3954,19 +3927,13 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.0.0-alpha.10: - version "1.0.0-alpha.10" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.10.tgz#61c8d5f9b5b2e05d84eba941d05b6f5202f68a2a" - dependencies: - semver "^5.3.0" - node-releases@^1.0.0-alpha.11: version "1.0.0-alpha.11" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" dependencies: semver "^5.3.0" -node-sass@^4.9.3: +node-sass@^4.9.2: version "4.9.3" resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.9.3.tgz#f407cf3d66f78308bb1e346b24fa428703196224" dependencies: @@ -4292,10 +4259,6 @@ oauth-sign@~0.8.1, oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -5139,7 +5102,7 @@ postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0 source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.0, postcss@^6.0.1, postcss@^6.0.19: +postcss@^6.0.0, postcss@^6.0.19: version "6.0.23" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.23.tgz#61c82cc328ac60e677645f979054eb98bc0e3324" dependencies: @@ -5241,10 +5204,6 @@ pseudomap@^1.0.1, pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -psl@^1.1.24: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" - public-encrypt@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994" @@ -5297,7 +5256,7 @@ qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" -qs@~6.5.1, qs@~6.5.2: +qs@~6.5.1: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -5606,7 +5565,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@2.87.0, request@^2.74.0, request@^2.81.0: +request@2.87.0, request@^2.74.0, request@^2.81.0, request@^2.87.0: version "2.87.0" resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" dependencies: @@ -5658,31 +5617,6 @@ request@2.87.0, request@^2.74.0, request@^2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" -request@^2.87.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -6499,13 +6433,6 @@ tough-cookie@~2.3.0, tough-cookie@~2.3.3: dependencies: punycode "^1.4.1" -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" From d5dc3a7fe6c2d6cb40e5281165391b44e7617ccd Mon Sep 17 00:00:00 2001 From: luis cielak Date: Wed, 29 Aug 2018 12:24:29 -0400 Subject: [PATCH 2/7] Begin adding read-only fields --- templates/request_approval.html | 74 +++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/templates/request_approval.html b/templates/request_approval.html index da5622e0..03a5242a 100644 --- a/templates/request_approval.html +++ b/templates/request_approval.html @@ -14,7 +14,81 @@
+

Ongoing maintainence for Death Star (a moon-sized Imperial military battlestation armed with a planet-destroying superlaser). Its definitely hasn't been sabotaged from the start.

+ +

Details of Use

+
+
+
DoD Component
+
+ Army, Department of the +
+
+
+
JEDI Usage
+
asdsa
+
+
+
Number of software systems
+
+ 2 +
+
+
+
JEDI Migration
+
yes
+
+
+
Rationalization of Software Systems
+
yes
+
+
+
Technical Support Team
+
yes
+
+
+
Organization Providing Assistance
+
+ In-house staff +
+
+
+
Engineering Assessment
+
yes
+
+
+
Data Transfers
+
+ Less than 100GB +
+
+
+
Expected Completion Date
+
+ Less than 1 month +
+
+
+
Estimated Monthly Spend
+
+ $12 +
+
+
+
Total Spend
+
+ $1,231 +
+
+
+
Start Date
+
12/12/2018
+
+
+ + +

Information About Requestor

From 042d8310851a6951adf1756f553bdd17429b538d Mon Sep 17 00:00:00 2001 From: luis cielak Date: Wed, 29 Aug 2018 17:16:40 -0400 Subject: [PATCH 3/7] Add placeholder text from request --- templates/request_approval.html | 164 ++++++++++++++++++++++--------- templates/requests/screen-4.html | 2 +- 2 files changed, 119 insertions(+), 47 deletions(-) diff --git a/templates/request_approval.html b/templates/request_approval.html index 03a5242a..ea843615 100644 --- a/templates/request_approval.html +++ b/templates/request_approval.html @@ -87,7 +87,77 @@
+
+

Information About You

+
+
+
First Name
+
Amanda
+
+
+
Last Name
+
Adamson
+
+
+
Email Address
+
amanda@test.com
+
+
+
Phone Number
+
+ +1 (123) 123 - 1231 +
+
+
+
Service Branch or Agency
+
+ Air Force, Department of the +
+
+
+
Citizenship
+
United States
+
+
+
Designation of Person
+
+ Military +
+
+
+
Latest Information Assurance (IA) Training completion date
+
12/12/2017
+
+
+ +
+

Workspace Owner

+
+
+
POC First Name
+
Amanda
+
+
+
POC Last Name
+
Adamson
+
+
+
POC Email Address
+
amanda@test.com
+
+
+
DOD ID
+
2345678901
+
+
+ +
+ + + +
+
@@ -134,6 +204,54 @@
+
+
+

Here is some good text explaining what the CCPO needs to do in order to approve the request. This text should also explain why we are asking for multiple people's names and the risk of boiling the ocean.

+ + +
+ + +
+ +
+
+
+ + +
+ +
+ + +
+ +
+ + +
+
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+
+

Approval Log

@@ -200,54 +318,8 @@
-
-
-

Here is some good text explaining what the CCPO needs to do in order to approve the request. This text should also explain why we are asking for multiple people's names and the risk of boiling the ocean.

-
- - -
- -
-
-
- - -
- -
- - -
- -
- - -
-
- -
-
- - -
- -
- - -
- -
- - -
-
-
-
-
-
Approve Request Deny Request diff --git a/templates/requests/screen-4.html b/templates/requests/screen-4.html index 566bdba6..3f079e7c 100644 --- a/templates/requests/screen-4.html +++ b/templates/requests/screen-4.html @@ -267,7 +267,7 @@

- Primary Point of Contact + Workspace Owner {{ Icon('edit') }} Edit this section From e768758483e58c30f251869239daba931fb8e27f Mon Sep 17 00:00:00 2001 From: luis cielak Date: Wed, 29 Aug 2018 17:18:02 -0400 Subject: [PATCH 4/7] Style horizontal ruler --- styles/elements/_panels.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/styles/elements/_panels.scss b/styles/elements/_panels.scss index a6e55caa..c18c2e9b 100644 --- a/styles/elements/_panels.scss +++ b/styles/elements/_panels.scss @@ -96,3 +96,9 @@ @include panel-actions; } +hr { + border: 0; + border-bottom: 1px dashed $color-gray-light; + margin: 0px $site-margins*-4; +} + From 0a62157d00546e2010f79b7dbfc6153183072cec Mon Sep 17 00:00:00 2001 From: luis cielak Date: Thu, 30 Aug 2018 09:40:45 -0400 Subject: [PATCH 5/7] Organize approval sections --- styles/elements/_action_group.scss | 1 + templates/request_approval.html | 71 ++++++------------------------ 2 files changed, 14 insertions(+), 58 deletions(-) diff --git a/styles/elements/_action_group.scss b/styles/elements/_action_group.scss index acf2c1fc..fc38eb04 100644 --- a/styles/elements/_action_group.scss +++ b/styles/elements/_action_group.scss @@ -3,6 +3,7 @@ flex-direction: row-reverse; align-items: center; margin-top: $gap * 4; + margin-bottom: $gap * 4; .usa-button, a { diff --git a/templates/request_approval.html b/templates/request_approval.html index ea843615..d283fd2c 100644 --- a/templates/request_approval.html +++ b/templates/request_approval.html @@ -156,55 +156,11 @@ -
-
- -
-
-

Information About Requestor

-
-
-
Name
-
Firmus Piett
-
- -
-
E-mail
-
piett@empire.mil
-
- -
-
Phone Number
-
(123) 456-7890
-
- -
-
Location
-
Death Star
-
-
-
- -
-

Funding Information

-
-
-
Task Order Number
-
4523542345322345234
-
- -
-
Funding Type
-
Previously: Modest Destructive Power
-
Changed to: Absolute Destructive Power
-
-
-
-
-
-
-
+
+

Approval Notes

+
+

Here is some good text explaining what the CCPO needs to do in order to approve the request. This text should also explain why we are asking for multiple people's names and the risk of boiling the ocean.

@@ -252,6 +208,15 @@
+
+ Approve Request + Deny Request + + {{ Icon('x') }} + Cancel + +
+

Approval Log

@@ -318,16 +283,6 @@

- - - From 0a36f1d6cad0989164850f4da72a617c773e0660 Mon Sep 17 00:00:00 2001 From: dandds Date: Thu, 30 Aug 2018 10:54:25 -0400 Subject: [PATCH 6/7] move request review information into a partial --- atst/filters.py | 5 +- atst/routes/requests/__init__.py | 1 + atst/routes/requests/approval.py | 9 + templates/request_approval.html | 174 +++++-------------- templates/requests/_review.html | 278 +++++++++++++++++++++++++++++++ templates/requests/screen-4.html | 271 +----------------------------- 6 files changed, 335 insertions(+), 403 deletions(-) create mode 100644 atst/routes/requests/approval.py create mode 100644 templates/requests/_review.html diff --git a/atst/filters.py b/atst/filters.py index 6811d198..6ecd6d1f 100644 --- a/atst/filters.py +++ b/atst/filters.py @@ -30,7 +30,10 @@ def readableInteger(value): def getOptionLabel(value, options): - return next(tup[1] for tup in options if tup[0] == value) + try: + return next(tup[1] for tup in options if tup[0] == value) + except StopIteration: + return def mixedContentToJson(value): diff --git a/atst/routes/requests/__init__.py b/atst/routes/requests/__init__.py index 8dfc1a20..d4214f56 100644 --- a/atst/routes/requests/__init__.py +++ b/atst/routes/requests/__init__.py @@ -7,6 +7,7 @@ requests_bp = Blueprint("requests", __name__) from . import index from . import requests_form from . import financial_verification +from . import approval @requests_bp.context_processor diff --git a/atst/routes/requests/approval.py b/atst/routes/requests/approval.py new file mode 100644 index 00000000..8d16960a --- /dev/null +++ b/atst/routes/requests/approval.py @@ -0,0 +1,9 @@ +from flask import render_template + +from . import requests_bp +from atst.forms.data import SERVICE_BRANCHES + + +@requests_bp.route("/request_approval", methods=["GET"]) +def requests_approval(): + return render_template("request_approval.html", service_branches=SERVICE_BRANCHES) diff --git a/templates/request_approval.html b/templates/request_approval.html index d283fd2c..ab44c907 100644 --- a/templates/request_approval.html +++ b/templates/request_approval.html @@ -17,140 +17,46 @@

Ongoing maintainence for Death Star (a moon-sized Imperial military battlestation armed with a planet-destroying superlaser). Its definitely hasn't been sabotaged from the start.

-

Details of Use

-
-
-
DoD Component
-
- Army, Department of the -
-
-
-
JEDI Usage
-
asdsa
-
-
-
Number of software systems
-
- 2 -
-
-
-
JEDI Migration
-
yes
-
-
-
Rationalization of Software Systems
-
yes
-
-
-
Technical Support Team
-
yes
-
-
-
Organization Providing Assistance
-
- In-house staff -
-
-
-
Engineering Assessment
-
yes
-
-
-
Data Transfers
-
- Less than 100GB -
-
-
-
Expected Completion Date
-
- Less than 1 month -
-
-
-
Estimated Monthly Spend
-
- $12 -
-
-
-
Total Spend
-
- $1,231 -
-
-
-
Start Date
-
12/12/2018
-
-
- -
-

Information About You

- -
-
-
First Name
-
Amanda
-
-
-
Last Name
-
Adamson
-
-
-
Email Address
-
amanda@test.com
-
-
-
Phone Number
-
- +1 (123) 123 - 1231 -
-
-
-
Service Branch or Agency
-
- Air Force, Department of the -
-
-
-
Citizenship
-
United States
-
-
-
Designation of Person
-
- Military -
-
-
-
Latest Information Assurance (IA) Training completion date
-
12/12/2017
-
-
- -
-

Workspace Owner

-
-
-
POC First Name
-
Amanda
-
-
-
POC Last Name
-
Adamson
-
-
-
POC Email Address
-
amanda@test.com
-
-
-
DOD ID
-
2345678901
-
-
+ {% with data = { + "primary_poc": { + "am_poc": False, + "dodid_poc": "1234567890", + "email_poc": "fake@email.com", + "fname_poc": "Amanda", + "lname_poc": "Adamson", + }, + "details_of_use": { + "jedi_usage": "adf", + "start_date": "2018-08-08", + "cloud_native": "yes", + "dollar_value": 500000, + "dod_component": "Air Force, Department of the", + "data_transfers": "Less than 100GB", + "expected_completion_date": "Less than 1 month", + "jedi_migration": "yes", + "num_software_systems": 1, + "number_user_sessions": 2, + "average_daily_traffic": 1, + "engineering_assessment": "yes", + "technical_support_team": "yes", + "estimated_monthly_spend": 100, + "average_daily_traffic_gb": 4, + "rationalization_software_systems": "yes", + "organization_providing_assistance": "In-house staff", + }, + "information_about_you": { + "citizenship": "United States", + "designation": "military", + "phone_number": "1234567890", + "email_request": "fake@email.mil", + "fname_request": "Amanda", + "lname_request": "Adamson", + "service_branch": "Air Force, Department of the", + "date_latest_training": "2018-08-06", + } + }, service_branches=service_branches %} + {% include "requests/_review.html" %} + {% endwith %} diff --git a/templates/requests/_review.html b/templates/requests/_review.html new file mode 100644 index 00000000..6c038958 --- /dev/null +++ b/templates/requests/_review.html @@ -0,0 +1,278 @@ +{% macro RequiredLabel() -%} + Response Required +{%- endmacro %} + +

+ Details of Use + {% if editable %} + + {{ Icon('edit') }} + Edit this section + + {% endif %} +

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

+ Information About You + {% if editable %} + + {{ Icon('edit') }} + Edit this section + + {% endif %} +

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

+ Workspace Owner + {% if editable %} + + {{ Icon('edit') }} + Edit this section + + {% endif %} +

+ +
+
+
POC First Name
+
{{ data['primary_poc']['fname_poc'] or RequiredLabel() }}
+
+ +
+
POC Last Name
+
{{ data['primary_poc']['lname_poc'] or RequiredLabel() }}
+
+ +
+
POC Email Address
+
{{ data['primary_poc']['email_poc'] or RequiredLabel() }}
+
+ +
+
DOD ID
+
{{ data['primary_poc']['dodid_poc'] or RequiredLabel() }}
+
+
+ + diff --git a/templates/requests/screen-4.html b/templates/requests/screen-4.html index 3f079e7c..c53b3a25 100644 --- a/templates/requests/screen-4.html +++ b/templates/requests/screen-4.html @@ -28,274 +28,9 @@ ) }} {% endif %} - -

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

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

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

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

- Workspace Owner - - {{ Icon('edit') }} - Edit this section - -

- -
-
-
POC First Name
-
{{ data['primary_poc']['fname_poc'] or RequiredLabel() }}
-
- -
-
POC Last Name
-
{{ data['primary_poc']['lname_poc'] or RequiredLabel() }}
-
- -
-
POC Email Address
-
{{ data['primary_poc']['email_poc'] or RequiredLabel() }}
-
- -
-
DOD ID
-
{{ data['primary_poc']['dodid_poc'] or RequiredLabel() }}
-
-
- + {% with editable=True %} + {% include "requests/_review.html" %} + {% endwith %} {% endblock %} From 1a8922750fddf9202477248dfe755b30473dc420 Mon Sep 17 00:00:00 2001 From: luis cielak Date: Thu, 30 Aug 2018 13:23:02 -0400 Subject: [PATCH 7/7] Add horizonal ruler dividers --- templates/requests/_review.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/requests/_review.html b/templates/requests/_review.html index 6c038958..8d21d7f2 100644 --- a/templates/requests/_review.html +++ b/templates/requests/_review.html @@ -2,6 +2,7 @@ Response Required {%- endmacro %} +

Details of Use {% if editable %} @@ -24,7 +25,6 @@ -
JEDI Usage
{{ data['details_of_use']['jedi_usage'] or RequiredLabel() }}
@@ -171,7 +171,7 @@
- +

Information About You {% if editable %} @@ -242,7 +242,7 @@ - +

Workspace Owner {% if editable %}