From 76e193a4caab807e3dab69f9f1ca4328fcdea269 Mon Sep 17 00:00:00 2001 From: Luis Cielak Date: Mon, 9 Jul 2018 15:54:31 -0400 Subject: [PATCH 1/4] Apply grid fixes to new quest form --- scss/core/_base.scss | 8 ++++ scss/core/_grid.scss | 1 + scss/elements/_panels.scss | 12 +++++- scss/sections/_footer.scss | 7 +--- scss/sections/_sidenav.scss | 10 +++-- templates/footer.html.to | 12 ++---- templates/requests/sidebar.html.to | 50 ++++++++++++++---------- templates/requests_new.html.to | 61 +++++++++++++++++++----------- 8 files changed, 98 insertions(+), 63 deletions(-) diff --git a/scss/core/_base.scss b/scss/core/_base.scss index d56847b9..57513b32 100644 --- a/scss/core/_base.scss +++ b/scss/core/_base.scss @@ -5,4 +5,12 @@ body { background-color: $color-gray-lightest; + display: flex; + flex-direction: column; + justify-content: flex-start; + min-height: 100vh; + + > footer { + margin-top: auto; + } } diff --git a/scss/core/_grid.scss b/scss/core/_grid.scss index e00b4948..a18f6b44 100644 --- a/scss/core/_grid.scss +++ b/scss/core/_grid.scss @@ -13,6 +13,7 @@ display: flex; flex-direction: row; flex-wrap: wrap; + max-width: $site-max-width; } } diff --git a/scss/elements/_panels.scss b/scss/elements/_panels.scss index 357f01dd..6f655012 100644 --- a/scss/elements/_panels.scss +++ b/scss/elements/_panels.scss @@ -3,7 +3,7 @@ * A generic block container */ -@mixin panel-base { + @mixin panel-base { background-color: $color-white; border-top-width: 1px; border-bottom-width: 1px; @@ -28,6 +28,11 @@ @include panel-base; @include panel-theme-default; @include panel-margin; + + &__content { + padding-left: $gap*4; + padding-right: $gap*4; + } } /* @@ -35,16 +40,19 @@ * Grid container for panel blocks */ -.panel-container { + .panel-container { @include grid-row; @include grid-pad; @include margin(($site-margins-mobile * 2) null); @include media($medium-screen) { @include margin(($site-margins * 2) null); + flex-wrap: nowrap; } > .col { @include grid-pad; } + + } diff --git a/scss/sections/_footer.scss b/scss/sections/_footer.scss index 58ac49ce..b6161917 100644 --- a/scss/sections/_footer.scss +++ b/scss/sections/_footer.scss @@ -1,9 +1,6 @@ footer { - position: fixed; - bottom: 0; - width: 100%; - padding-top: 0.5rem; - padding-bottom: 1em; background-color: $color-gray-lightest; border-top: 1px solid $color-gray-lighter; + padding-left: $gap*4; + padding-bottom: $gap*2; } \ No newline at end of file diff --git a/scss/sections/_sidenav.scss b/scss/sections/_sidenav.scss index 30dc7865..7b1b3d2c 100644 --- a/scss/sections/_sidenav.scss +++ b/scss/sections/_sidenav.scss @@ -2,13 +2,15 @@ @include grid-pad; @include panel-margin; width: 100%; - display: flex; - flex-direction: column; @include media($large-screen) { width: 21rem; } + @include media($xlarge-screen) { + width: 30rem; + } + .sidenav__link { display: block; border-top: 1px solid $color-black; @@ -36,7 +38,7 @@ background-color: $color-white; .sidenav__link { - &.sidenav__link--active { + &--active { @include h5; box-shadow: none; } @@ -74,6 +76,8 @@ } > ul { + @include panel-margin; + > li { &:last-child { > .sidenav__link { diff --git a/templates/footer.html.to b/templates/footer.html.to index fadd677b..b86f9b97 100644 --- a/templates/footer.html.to +++ b/templates/footer.html.to @@ -1,9 +1,3 @@ - + \ No newline at end of file diff --git a/templates/requests/sidebar.html.to b/templates/requests/sidebar.html.to index 6543fa2c..c9ed12f3 100644 --- a/templates/requests/sidebar.html.to +++ b/templates/requests/sidebar.html.to @@ -1,23 +1,31 @@ - + \ No newline at end of file diff --git a/templates/requests_new.html.to b/templates/requests_new.html.to index d9b417bf..5437a8a6 100644 --- a/templates/requests_new.html.to +++ b/templates/requests_new.html.to @@ -1,35 +1,50 @@ {% extends "base.html.to" %} + +{% block sidenav %} +{% include 'requests/sidebar.html.to' %} +{% end %} + + {% block content %} +
+ +
+ +
+
+

New Request

+
+ + + + {% if request_id %} +
+ {% else %} + + {% end %} + + {% module xsrf_form_html() %} + {% block form %} + form goes here + {% end %} + {% block next %} + + {% end %} +
+ + + + +
- +
+
-

New Request

- -
- - {% if request_id %} -
- {% else %} - - {% end %} - - {% module xsrf_form_html() %} - {% block form %} - form goes here - {% end %} - {% block next %} - - {% end %} -
- -
{% end %} From c41080f51c4877d1ca53d3da28b9fa7aaf3cb47f Mon Sep 17 00:00:00 2001 From: Luis Cielak Date: Mon, 9 Jul 2018 15:59:20 -0400 Subject: [PATCH 2/4] Add placeholder anchor link --- atst/forms/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atst/forms/request.py b/atst/forms/request.py index bbc1109a..36aa2043 100644 --- a/atst/forms/request.py +++ b/atst/forms/request.py @@ -11,7 +11,7 @@ class RequestForm(Form): # Details of Use: Overall Request Details dollar_value = IntegerField( - "What is the total estimated dollar value of the cloud resources you are requesting using the JEDI CSP Calculator? ", + "What is the total estimated dollar value of the cloud resources you are requesting using the JEDI CSP Calculator?", validators=[InputRequired(), NumberRange(min=1)], ) From a1b74a6f6238a3be0e0283123b006038aaa9aa2d Mon Sep 17 00:00:00 2001 From: Luis Cielak Date: Mon, 9 Jul 2018 15:54:31 -0400 Subject: [PATCH 3/4] Apply grid fixes to new quest form --- scss/core/_base.scss | 8 ++++ scss/core/_grid.scss | 1 + scss/elements/_panels.scss | 12 +++++- scss/sections/_footer.scss | 7 +--- scss/sections/_sidenav.scss | 10 +++-- templates/footer.html.to | 12 ++---- templates/requests/sidebar.html.to | 50 ++++++++++++++---------- templates/requests_new.html.to | 61 +++++++++++++++++++----------- 8 files changed, 98 insertions(+), 63 deletions(-) diff --git a/scss/core/_base.scss b/scss/core/_base.scss index d56847b9..57513b32 100644 --- a/scss/core/_base.scss +++ b/scss/core/_base.scss @@ -5,4 +5,12 @@ body { background-color: $color-gray-lightest; + display: flex; + flex-direction: column; + justify-content: flex-start; + min-height: 100vh; + + > footer { + margin-top: auto; + } } diff --git a/scss/core/_grid.scss b/scss/core/_grid.scss index e00b4948..a18f6b44 100644 --- a/scss/core/_grid.scss +++ b/scss/core/_grid.scss @@ -13,6 +13,7 @@ display: flex; flex-direction: row; flex-wrap: wrap; + max-width: $site-max-width; } } diff --git a/scss/elements/_panels.scss b/scss/elements/_panels.scss index 357f01dd..6f655012 100644 --- a/scss/elements/_panels.scss +++ b/scss/elements/_panels.scss @@ -3,7 +3,7 @@ * A generic block container */ -@mixin panel-base { + @mixin panel-base { background-color: $color-white; border-top-width: 1px; border-bottom-width: 1px; @@ -28,6 +28,11 @@ @include panel-base; @include panel-theme-default; @include panel-margin; + + &__content { + padding-left: $gap*4; + padding-right: $gap*4; + } } /* @@ -35,16 +40,19 @@ * Grid container for panel blocks */ -.panel-container { + .panel-container { @include grid-row; @include grid-pad; @include margin(($site-margins-mobile * 2) null); @include media($medium-screen) { @include margin(($site-margins * 2) null); + flex-wrap: nowrap; } > .col { @include grid-pad; } + + } diff --git a/scss/sections/_footer.scss b/scss/sections/_footer.scss index 58ac49ce..b6161917 100644 --- a/scss/sections/_footer.scss +++ b/scss/sections/_footer.scss @@ -1,9 +1,6 @@ footer { - position: fixed; - bottom: 0; - width: 100%; - padding-top: 0.5rem; - padding-bottom: 1em; background-color: $color-gray-lightest; border-top: 1px solid $color-gray-lighter; + padding-left: $gap*4; + padding-bottom: $gap*2; } \ No newline at end of file diff --git a/scss/sections/_sidenav.scss b/scss/sections/_sidenav.scss index 30dc7865..7b1b3d2c 100644 --- a/scss/sections/_sidenav.scss +++ b/scss/sections/_sidenav.scss @@ -2,13 +2,15 @@ @include grid-pad; @include panel-margin; width: 100%; - display: flex; - flex-direction: column; @include media($large-screen) { width: 21rem; } + @include media($xlarge-screen) { + width: 30rem; + } + .sidenav__link { display: block; border-top: 1px solid $color-black; @@ -36,7 +38,7 @@ background-color: $color-white; .sidenav__link { - &.sidenav__link--active { + &--active { @include h5; box-shadow: none; } @@ -74,6 +76,8 @@ } > ul { + @include panel-margin; + > li { &:last-child { > .sidenav__link { diff --git a/templates/footer.html.to b/templates/footer.html.to index fadd677b..b86f9b97 100644 --- a/templates/footer.html.to +++ b/templates/footer.html.to @@ -1,9 +1,3 @@ -
- -
- -
- -
+
+
Joint Enterprise Defense Infrastructure
+
\ No newline at end of file diff --git a/templates/requests/sidebar.html.to b/templates/requests/sidebar.html.to index 6543fa2c..c9ed12f3 100644 --- a/templates/requests/sidebar.html.to +++ b/templates/requests/sidebar.html.to @@ -1,23 +1,31 @@ - + \ No newline at end of file diff --git a/templates/requests_new.html.to b/templates/requests_new.html.to index d9b417bf..5437a8a6 100644 --- a/templates/requests_new.html.to +++ b/templates/requests_new.html.to @@ -1,35 +1,50 @@ {% extends "base.html.to" %} + +{% block sidenav %} +{% include 'requests/sidebar.html.to' %} +{% end %} + + {% block content %} +
+ +
+ +
+
+

New Request

+
+ + + + {% if request_id %} +
+ {% else %} + + {% end %} + + {% module xsrf_form_html() %} + {% block form %} + form goes here + {% end %} + {% block next %} + + {% end %} +
+ + + + +
- +
+
-

New Request

- -
- - {% if request_id %} -
- {% else %} - - {% end %} - - {% module xsrf_form_html() %} - {% block form %} - form goes here - {% end %} - {% block next %} - - {% end %} -
- -
{% end %} From 37bed89b6bb33a20a6a8649e92609b08c7ff1d05 Mon Sep 17 00:00:00 2001 From: Luis Cielak Date: Mon, 9 Jul 2018 15:59:20 -0400 Subject: [PATCH 4/4] Add placeholder anchor link --- atst/forms/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atst/forms/request.py b/atst/forms/request.py index bbc1109a..36aa2043 100644 --- a/atst/forms/request.py +++ b/atst/forms/request.py @@ -11,7 +11,7 @@ class RequestForm(Form): # Details of Use: Overall Request Details dollar_value = IntegerField( - "What is the total estimated dollar value of the cloud resources you are requesting using the JEDI CSP Calculator? ", + "What is the total estimated dollar value of the cloud resources you are requesting using the JEDI CSP Calculator?", validators=[InputRequired(), NumberRange(min=1)], )