From e8dede201b6e0cd5c7ccc2f9a31787bd520980e1 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 24 Jul 2019 13:04:39 -0400 Subject: [PATCH] Reorder elements on the page, fix input widths, move validation icon for inputs --- styles/sections/_task_order.scss | 69 ++++-- templates/components/options_input.html | 8 +- templates/components/text_input.html | 17 +- templates/task_orders/step_3.html | 279 ++++++++++++------------ 4 files changed, 209 insertions(+), 164 deletions(-) diff --git a/styles/sections/_task_order.scss b/styles/sections/_task_order.scss index 30304790..70699557 100644 --- a/styles/sections/_task_order.scss +++ b/styles/sections/_task_order.scss @@ -69,6 +69,57 @@ } } + .card { + padding: ($gap * 5); + + .usa-input { + margin: 0 $gap 0 0; + } + + span.icon.icon--ok.icon-validation { + left: 47.5em; + } + + .form-row { + margin: 0; + } + + .usa-input input { + max-width: -webkit-fill-available; + } + + select { + max-width: -webkit-fill-available; + } + + button { + margin-bottom: $gap * 3; + } + + .task-order__loa-fieldset { + .usa-input__title { + padding: 0 0 0.4rem 0; + font-size: 1.7rem; + } + + .usa-input { + margin: 0; + } + + input { + margin: $gap 0; + } + + input:first-child { + margin-top: 0; + } + + input:last-child { + margin-bottom: 0; + } + } + } + .usa-input__title, .usa-input__title-inline { font-weight: $font-normal; @@ -135,24 +186,6 @@ } } - .task-order__loa-fieldset { - .usa-input { - margin: 0; - } - - input { - margin: $gap 0; - } - - input:first-child { - margin-top: 0; - } - - input:last-child { - margin-bottom: 0; - } - } - button.icon-link { margin-top: 0; margin-left: 0; diff --git a/templates/components/options_input.html b/templates/components/options_input.html index 784fb9e8..b7d8d858 100644 --- a/templates/components/options_input.html +++ b/templates/components/options_input.html @@ -1,7 +1,7 @@ {% from "components/icon.html" import Icon %} {% from "components/tooltip.html" import Tooltip %} -{% macro OptionsInput(field, tooltip, inline=False, label=True, disabled=False, watch=False, optional=True) -%} +{% macro OptionsInput(field, tooltip, inline=False, label=True, show_validation=True, disabled=False, watch=False, optional=True) -%} {{ field.description | safe }} {% endif %} - {{ Icon('alert',classes="icon-validation") }} - {{ Icon('ok',classes="icon-validation") }} + {% if show_validation %} + {{ Icon('alert',classes="icon-validation") }} + {{ Icon('ok',classes="icon-validation") }} + {% endif %} {% endif %} diff --git a/templates/components/text_input.html b/templates/components/text_input.html index a979bd81..1b7e5aa7 100644 --- a/templates/components/text_input.html +++ b/templates/components/text_input.html @@ -16,7 +16,8 @@ noMaxWidth=False, optional=True, showLabel=True, - watch=False) -%} + watch=False, + show_validation=True) -%} - - + {% if show_validation %} + + + {% endif %} diff --git a/templates/task_orders/step_3.html b/templates/task_orders/step_3.html index bfb29b54..b027b18c 100644 --- a/templates/task_orders/step_3.html +++ b/templates/task_orders/step_3.html @@ -30,13 +30,6 @@ - - - @@ -63,10 +56,13 @@ {% endif %} inline-template>
+
+ Base CLIN Information +
{% if fields %} - {{ OptionsInput(fields.jedi_clin_type, watch=True) }} + {{ OptionsInput(fields.jedi_clin_type, watch=True, show_validation=False) }} {% else %}
@@ -127,140 +123,151 @@
-
-
- -
- {{ 'task_orders.form.loa_label' | translate }} -
-
- {% for loa in fields.loas %} - {{ TextInput(loa, showLabel=False, watch=True) }} - {% endfor %} +
+ +
+ {{ 'task_orders.form.loa_label' | translate }} +
+
+ {% for loa in fields.loas %} + {{ TextInput(loa, showLabel=False, watch=True, show_validation=False) }} + {% endfor %} - {{ LOAInput() }} -
+ {{ LOAInput() }} +
+ +
+ {% if fields %} +
+ {{ DatePicker(fields.start_date, watch=True, optional=False) }} +
+
+ {{ DatePicker(fields.end_date, watch=True, optional=False) }} +
+ {% else %} +
+ +
+ +
+ {{ 'task_orders.form.pop_start' | translate }} +
+
+ +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ {{ Icon("ok", classes="icon--green") }} +
+
+
+
+
+ +
+ +
+ +
+ {{ 'task_orders.form.pop_end' | translate }} +
+
+ +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ {{ Icon("ok", classes="icon--green") }} +
+
+
+
+
+ {% endif %}
{% if fields %} - {{ DatePicker(fields.start_date, watch=True, optional=False) }} - {{ DatePicker(fields.end_date, watch=True, optional=False) }} {{ TextInput(fields.obligated_amount, validation='dollars', watch=True) }} {% else %} - -
- -
- {{ 'task_orders.form.pop_start' | translate }} -
-
- -
- - -
- - -
- -
- - -
- -
- - -
- -
- {{ Icon("ok", classes="icon--green") }} -
-
-
-
- - -
- -
- {{ 'task_orders.form.pop_end' | translate }} -
-
- -
- - -
- - -
- -
- - -
- -
- - -
- -
- {{ Icon("ok", classes="icon--green") }} -
-
-
-
-