Merge pull request #1427 from dod-ccpo/new-portfolio-styling--v2
portfolio form styling
This commit is contained in:
commit
0bb23a74ec
@ -33,6 +33,7 @@ class PortfolioForm(BaseForm):
|
|||||||
class PortfolioCreationForm(PortfolioForm):
|
class PortfolioCreationForm(PortfolioForm):
|
||||||
defense_component = SelectMultipleField(
|
defense_component = SelectMultipleField(
|
||||||
translate("forms.portfolio.defense_component.title"),
|
translate("forms.portfolio.defense_component.title"),
|
||||||
|
description=translate("forms.portfolio.defense_component.help_text"),
|
||||||
choices=SERVICE_BRANCHES,
|
choices=SERVICE_BRANCHES,
|
||||||
widget=ListWidget(prefix_label=False),
|
widget=ListWidget(prefix_label=False),
|
||||||
option_widget=CheckboxInput(),
|
option_widget=CheckboxInput(),
|
||||||
|
@ -2,10 +2,6 @@
|
|||||||
.form-row {
|
.form-row {
|
||||||
margin: ($gap * 4) 0;
|
margin: ($gap * 4) 0;
|
||||||
|
|
||||||
&--bordered {
|
|
||||||
border-bottom: $color-gray-lighter 1px solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-col {
|
.form-col {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
|
|
||||||
@ -22,8 +18,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.usa-input {
|
.usa-input {
|
||||||
input {
|
input,
|
||||||
max-width: none;
|
textarea {
|
||||||
|
max-width: $max-input-width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -204,6 +201,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-container__half {
|
.form-container {
|
||||||
max-width: 46rem;
|
margin-bottom: $action-footer-height + $large-spacing;
|
||||||
|
|
||||||
|
&--narrow {
|
||||||
|
max-width: $max-input-width;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,17 +5,11 @@
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input__inline-fields {
|
|
||||||
text-align: left;
|
|
||||||
|
|
||||||
.usa-input__choices label {
|
|
||||||
font-weight: $font-bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.input__inline-fields {
|
.input__inline-fields {
|
||||||
padding: $gap * 2;
|
padding: $gap * 2;
|
||||||
border: 1px solid $color-gray-lighter;
|
border: 1px solid $color-gray-lighter;
|
||||||
|
text-align: left;
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
&.checked {
|
&.checked {
|
||||||
border: 1px solid $color-blue;
|
border: 1px solid $color-blue;
|
||||||
@ -33,7 +27,7 @@
|
|||||||
|
|
||||||
.user-info {
|
.user-info {
|
||||||
.usa-input {
|
.usa-input {
|
||||||
width: 45rem;
|
max-width: $max-input-width;
|
||||||
|
|
||||||
input,
|
input,
|
||||||
label,
|
label,
|
||||||
@ -53,8 +47,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#modal--add-app-mem,
|
.form-content--member-form {
|
||||||
#modal--add-portfolio-manager {
|
|
||||||
.modal__body {
|
.modal__body {
|
||||||
min-width: 75rem;
|
min-width: 75rem;
|
||||||
}
|
}
|
||||||
|
@ -519,3 +519,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#portfolio-create {
|
||||||
|
.usa-input__choices {
|
||||||
|
.usa-input__title {
|
||||||
|
font-weight: $font-bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
font-size: $base-font-size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -98,7 +98,3 @@ hr {
|
|||||||
.usa-section {
|
.usa-section {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.form {
|
|
||||||
margin-bottom: $action-footer-height + $large-spacing;
|
|
||||||
}
|
|
||||||
|
@ -21,6 +21,7 @@ $home-pg-icon-width: 6rem;
|
|||||||
$large-spacing: 4rem;
|
$large-spacing: 4rem;
|
||||||
$max-page-width: $max-panel-width + $sidenav-expanded-width + $large-spacing;
|
$max-page-width: $max-panel-width + $sidenav-expanded-width + $large-spacing;
|
||||||
$action-footer-height: 6rem;
|
$action-footer-height: 6rem;
|
||||||
|
$max-input-width: 46rem;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* USWDS Variables
|
* USWDS Variables
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
.usa-input {
|
.usa-input {
|
||||||
margin: ($gap * 2) 0;
|
margin: ($gap * 2) 0;
|
||||||
max-width: 75rem;
|
max-width: $max-input-width;
|
||||||
|
|
||||||
&-label-helper {
|
&-label-helper {
|
||||||
font-size: $small-font-size;
|
font-size: $small-font-size;
|
||||||
@ -111,8 +111,7 @@
|
|||||||
@include h5;
|
@include h5;
|
||||||
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
max-width: $max-input-width;
|
||||||
@include line-max;
|
|
||||||
|
|
||||||
.icon-link {
|
.icon-link {
|
||||||
padding: 0 ($gap / 2);
|
padding: 0 ($gap / 2);
|
||||||
@ -180,6 +179,10 @@
|
|||||||
left: -3rem;
|
left: -3rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.usa-input__title {
|
||||||
|
margin-bottom: $gap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
@ -372,19 +375,15 @@ select {
|
|||||||
.phone-input {
|
.phone-input {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
&__phone {
|
&__phone {
|
||||||
margin-right: $gap * 4;
|
margin-right: $gap * 4;
|
||||||
|
flex-grow: 1;
|
||||||
|
|
||||||
.usa-input {
|
.usa-input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
input,
|
|
||||||
label,
|
|
||||||
.usa-input__message {
|
|
||||||
max-width: 20rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon-validation {
|
.icon-validation {
|
||||||
left: 20rem;
|
left: 20rem;
|
||||||
}
|
}
|
||||||
@ -392,7 +391,8 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&__extension {
|
&__extension {
|
||||||
margin-left: $gap * 4;
|
margin-right: $gap * 4;
|
||||||
|
flex-grow: 0;
|
||||||
|
|
||||||
.usa-input {
|
.usa-input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -140,6 +140,10 @@
|
|||||||
&__confirmation {
|
&__confirmation {
|
||||||
margin-left: $gap * 8;
|
margin-left: $gap * 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.usa-input {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-order__modal-cancel {
|
.task-order__modal-cancel {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
{% set invite_expired = member.role_status == 'invite_expired' %}
|
{% set invite_expired = member.role_status == 'invite_expired' %}
|
||||||
{%- if user_can(permissions.EDIT_APPLICATION_MEMBER) %}
|
{%- if user_can(permissions.EDIT_APPLICATION_MEMBER) %}
|
||||||
{% set modal_name = "edit_member-{}".format(loop.index) %}
|
{% set modal_name = "edit_member-{}".format(loop.index) %}
|
||||||
{% call Modal(modal_name, classes="form-content--app-mem") %}
|
{% call Modal(modal_name, classes="form-content--member-form") %}
|
||||||
<div class="modal__form--header">
|
<div class="modal__form--header">
|
||||||
<h1>{{ Icon('avatar') }} {{ "portfolios.applications.members.form.edit_access_header" | translate({ "user": member.user_name }) }}</h1>
|
<h1>{{ Icon('avatar') }} {{ "portfolios.applications.members.form.edit_access_header" | translate({ "user": member.user_name }) }}</h1>
|
||||||
</div>
|
</div>
|
||||||
@ -56,7 +56,7 @@
|
|||||||
|
|
||||||
{%- if invite_pending or invite_expired %}
|
{%- if invite_pending or invite_expired %}
|
||||||
{% set resend_invite_modal = "resend_invite-{}".format(member.role_id) %}
|
{% set resend_invite_modal = "resend_invite-{}".format(member.role_id) %}
|
||||||
{% call Modal(resend_invite_modal, classes="form-content--app-mem") %}
|
{% call Modal(resend_invite_modal, classes="form-content--member-form") %}
|
||||||
<div class="modal__form--header">
|
<div class="modal__form--header">
|
||||||
<h1>{{ "portfolios.applications.members.new.verify" | translate }}</h1>
|
<h1>{{ "portfolios.applications.members.new.verify" | translate }}</h1>
|
||||||
</div>
|
</div>
|
||||||
@ -183,6 +183,7 @@
|
|||||||
modal=new_member_modal_name,
|
modal=new_member_modal_name,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
classes="form-content--member-form",
|
||||||
) }}
|
) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
{% include "fragments/flash.html" %}
|
{% include "fragments/flash.html" %}
|
||||||
|
|
||||||
<base-form inline-template :enable-save="true">
|
<base-form inline-template :enable-save="true">
|
||||||
<form method="POST" action="{{ action }}" v-on:submit="handleSubmit" class="form">
|
<form method="POST" action="{{ action }}" v-on:submit="handleSubmit" class="form-container">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-col">
|
<div class="form-col">
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<hr>
|
<hr>
|
||||||
<application-environments inline-template v-bind:initial-data='{{ form.data|tojson }}'>
|
<application-environments inline-template v-bind:initial-data='{{ form.data|tojson }}'>
|
||||||
<form method="POST" action="{{ url_for('applications.update_new_application_step_2', portfolio_id=portfolio.id, application_id=application.id) }}" v-on:submit="handleSubmit" class="form">
|
<form method="POST" action="{{ url_for('applications.update_new_application_step_2', portfolio_id=portfolio.id, application_id=application.id) }}" v-on:submit="handleSubmit" class="form-container">
|
||||||
<div class="subheading">{{ 'portfolios.applications.environments_heading' | translate }}</div>
|
<div class="subheading">{{ 'portfolios.applications.environments_heading' | translate }}</div>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="panel__content">
|
<div class="panel__content">
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
{% if user_can(permissions.EDIT_APPLICATION) %}
|
{% if user_can(permissions.EDIT_APPLICATION) %}
|
||||||
<base-form inline-template>
|
<base-form inline-template>
|
||||||
<form method="POST" action="{{ url_for('applications.update', application_id=application.id) }}" class="col col--half">
|
<form method="POST" action="{{ url_for('applications.update', application_id=application.id) }}" class="form-container--narrow">
|
||||||
{{ application_form.csrf_token }}
|
{{ application_form.csrf_token }}
|
||||||
{{ TextInput(application_form.name, validation="applicationName", optional=False) }}
|
{{ TextInput(application_form.name, validation="applicationName", optional=False) }}
|
||||||
{{ TextInput(application_form.description, validation="defaultTextAreaField", paragraph=True, optional=True, showOptional=False) }}
|
{{ TextInput(application_form.description, validation="defaultTextAreaField", paragraph=True, optional=True, showOptional=False) }}
|
||||||
|
@ -25,10 +25,10 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro MultiStepModalForm(name, form, form_action, steps, dismissable=False) -%}
|
{% macro MultiStepModalForm(name, form, form_action, steps, dismissable=False, classes="") -%}
|
||||||
{% set step_count = steps|length %}
|
{% set step_count = steps|length %}
|
||||||
<multi-step-modal-form inline-template :steps={{ step_count }}>
|
<multi-step-modal-form inline-template :steps={{ step_count }}>
|
||||||
{% call Modal(name=name, dismissable=dismissable) %}
|
{% call Modal(name=name, dismissable=dismissable, classes=classes) %}
|
||||||
<form id="{{ name }}" action="{{ form_action }}" method="POST" v-on:submit="handleSubmit">
|
<form id="{{ name }}" action="{{ form_action }}" method="POST" v-on:submit="handleSubmit">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div v-if="$root.activeModal === '{{ name }}'">
|
<div v-if="$root.activeModal === '{{ name }}'">
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<div v-cloak class="portfolio-admin">
|
<div v-cloak class="portfolio-admin">
|
||||||
{% include "fragments/flash.html" %}
|
{% include "fragments/flash.html" %}
|
||||||
<!-- max width of this section is 460px -->
|
<!-- max width of this section is 460px -->
|
||||||
<section class="form-container__half">
|
<section class="form-container--narrow">
|
||||||
<h3>Portfolio name and component</h3>
|
<h3>Portfolio name and component</h3>
|
||||||
{% if user_can(permissions.EDIT_PORTFOLIO_NAME) %}
|
{% if user_can(permissions.EDIT_PORTFOLIO_NAME) %}
|
||||||
<base-form inline-template>
|
<base-form inline-template>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{% set invite_expired = member.status == 'invite_expired' %}
|
{% set invite_expired = member.status == 'invite_expired' %}
|
||||||
|
|
||||||
{% set modal_name = "edit_member-{}".format(loop.index) %}
|
{% set modal_name = "edit_member-{}".format(loop.index) %}
|
||||||
{% call Modal(modal_name, classes="form-content--app-mem") %}
|
{% call Modal(modal_name, classes="form-content--member-form") %}
|
||||||
<div class="modal__form--header">
|
<div class="modal__form--header">
|
||||||
<h1>{{ Icon('avatar') }} {{ "portfolios.applications.members.form.edit_access_header" | translate({ "user": member.user_name }) }}</h1>
|
<h1>{{ Icon('avatar') }} {{ "portfolios.applications.members.form.edit_access_header" | translate({ "user": member.user_name }) }}</h1>
|
||||||
</div>
|
</div>
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
{% if invite_pending or invite_expired -%}
|
{% if invite_pending or invite_expired -%}
|
||||||
{% set resend_invite_modal = "resend_invite-{}".format(member.role_id) %}
|
{% set resend_invite_modal = "resend_invite-{}".format(member.role_id) %}
|
||||||
{% call Modal(resend_invite_modal, classes="form-content--app-mem") %}
|
{% call Modal(resend_invite_modal, classes="form-content--member-form") %}
|
||||||
<div class="modal__form--header">
|
<div class="modal__form--header">
|
||||||
<h1>{{ "portfolios.applications.members.new.verify" | translate }}</h1>
|
<h1>{{ "portfolios.applications.members.new.verify" | translate }}</h1>
|
||||||
</div>
|
</div>
|
||||||
@ -182,6 +182,7 @@
|
|||||||
modal=new_manager_modal,
|
modal=new_manager_modal,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
classes="form-content--member-form",
|
||||||
) }}
|
) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
@ -19,24 +19,25 @@
|
|||||||
{{ StickyCTA(text="portfolios.new.cta_step_1"|translate, context=("portfolios.new.sticky_header_context"|translate({"step": "1"}) )) }}
|
{{ StickyCTA(text="portfolios.new.cta_step_1"|translate, context=("portfolios.new.sticky_header_context"|translate({"step": "1"}) )) }}
|
||||||
<base-form inline-template>
|
<base-form inline-template>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<form id="portfolio-create" class="col form" action="{{ url_for('portfolios.create_portfolio') }}" method="POST">
|
<form id="portfolio-create" class="col form-container" action="{{ url_for('portfolios.create_portfolio') }}" method="POST">
|
||||||
{{ form.csrf_token }}
|
{{ form.csrf_token }}
|
||||||
<div class="form-row form-row--bordered">
|
<div class="form-row">
|
||||||
<div class="form-col">
|
<div class="form-col">
|
||||||
{{ TextInput(form.name, validation="portfolioName", optional=False, classes="form-col") }}
|
{{ TextInput(form.name, validation="portfolioName", optional=False, classes="form-col") }}
|
||||||
{{"forms.portfolio.name.help_text" | translate | safe }}
|
{{"forms.portfolio.name.help_text" | translate | safe }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-row form-row--bordered">
|
<hr>
|
||||||
|
<div class="form-row">
|
||||||
<div class="form-col">
|
<div class="form-col">
|
||||||
{{ TextInput(form.description, validation="defaultTextAreaField", paragraph=True) }}
|
{{ TextInput(form.description, validation="defaultTextAreaField", paragraph=True) }}
|
||||||
{{"forms.portfolio.description.help_text" | translate | safe }}
|
{{"forms.portfolio.description.help_text" | translate | safe }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<hr>
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<div class="form-col">
|
<div class="form-col">
|
||||||
{{ MultiCheckboxInput(form.defense_component, optional=False) }}
|
{{ MultiCheckboxInput(form.defense_component, optional=False) }}
|
||||||
{{ "forms.portfolio.defense_component.help_text" | translate | safe }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
{% include "fragments/flash.html" %}
|
{% include "fragments/flash.html" %}
|
||||||
|
|
||||||
<div class="task-order form">
|
<div class="task-order form-container">
|
||||||
{% block to_builder_form_field %}{% endblock %}
|
{% block to_builder_form_field %}{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
@ -271,7 +271,7 @@ forms:
|
|||||||
label: Portfolio Name
|
label: Portfolio Name
|
||||||
length_validation_message: Portfolio names can be between 4-100 characters
|
length_validation_message: Portfolio names can be between 4-100 characters
|
||||||
help_text: |
|
help_text: |
|
||||||
<div>
|
<div class="usa-input__help">
|
||||||
<p>
|
<p>
|
||||||
Naming can be difficult. Choose a name that is descriptive enough for users to identify the Portfolio. You may consider naming based on your organization.
|
Naming can be difficult. Choose a name that is descriptive enough for users to identify the Portfolio. You may consider naming based on your organization.
|
||||||
</p>
|
</p>
|
||||||
@ -285,7 +285,7 @@ forms:
|
|||||||
description:
|
description:
|
||||||
label: Portfolio Description
|
label: Portfolio Description
|
||||||
help_text: |
|
help_text: |
|
||||||
<div>
|
<div class="usa-input__help">
|
||||||
<p>
|
<p>
|
||||||
Add a brief one to two sentence description of your Portfolio. Consider this your statement of work.
|
Add a brief one to two sentence description of your Portfolio. Consider this your statement of work.
|
||||||
</p>
|
</p>
|
||||||
@ -310,11 +310,9 @@ forms:
|
|||||||
title: Select DoD component(s) funding your Portfolio
|
title: Select DoD component(s) funding your Portfolio
|
||||||
validation_message: You must select at least one defense component.
|
validation_message: You must select at least one defense component.
|
||||||
help_text: |
|
help_text: |
|
||||||
<p>
|
|
||||||
Select the DOD component(s) that will fund all Applications within this Portfolio.
|
Select the DOD component(s) that will fund all Applications within this Portfolio.
|
||||||
In JEDI, multiple DoD organizations can fund the same Portfolio.<br/>
|
In JEDI, multiple DoD organizations can fund the same Portfolio.<br/>
|
||||||
Select all that apply.<br/>
|
Select all that apply.
|
||||||
</p>
|
|
||||||
attachment:
|
attachment:
|
||||||
object_name:
|
object_name:
|
||||||
length_error: Object name may be no longer than 40 characters.
|
length_error: Object name may be no longer than 40 characters.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user