From 5a16af8cbbf5330b6f0b8f88b1f611d9c6e0a390 Mon Sep 17 00:00:00 2001 From: graham-dds Date: Tue, 8 Oct 2019 15:20:21 -0400 Subject: [PATCH 01/18] Switch up buttons on new app provisioning, step 1 - change cancel button to a link - add disabled previous button --- templates/applications/new/step_1.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/applications/new/step_1.html b/templates/applications/new/step_1.html index e6a2bd54..9ae0ba36 100644 --- a/templates/applications/new/step_1.html +++ b/templates/applications/new/step_1.html @@ -45,7 +45,8 @@ {% block next_button %} {{ SaveButton(text=('portfolios.applications.new.step_1_button_text' | translate)) }} {% endblock %} - + + Cancel From 33e82bfb83c7b3ef9bc61d5e233834ea62a0f209 Mon Sep 17 00:00:00 2001 From: graham-dds Date: Wed, 9 Oct 2019 09:40:50 -0400 Subject: [PATCH 02/18] Allow markup in Alert title --- templates/components/alert.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/components/alert.html b/templates/components/alert.html index 8406a3da..49f148b9 100644 --- a/templates/components/alert.html +++ b/templates/components/alert.html @@ -27,7 +27,7 @@ {% if vue_template %}

{% elif title %} -

{{title}}

+

{{ title | safe }}

{% endif %} {% if message %} From 24be9a6a61bc4c46c24c0eba40eef7a61a8f9012 Mon Sep 17 00:00:00 2001 From: graham-dds Date: Wed, 9 Oct 2019 09:42:47 -0400 Subject: [PATCH 03/18] Update copy for new app provisioning - change flashed message for adding members - use the correct helper text for the app name input - a few other updates to text in translations --- atst/routes/applications/settings.py | 6 +----- atst/utils/flash.py | 4 ++-- templates/applications/new/step_1.html | 2 +- translations.yaml | 16 +++++++++------- 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/atst/routes/applications/settings.py b/atst/routes/applications/settings.py index 18b92603..8b92ca0f 100644 --- a/atst/routes/applications/settings.py +++ b/atst/routes/applications/settings.py @@ -183,11 +183,7 @@ def handle_create_member(application_id, form_data): token=invite.token, ) - flash( - "new_application_member", - user_name=invite.user_name, - application_name=application.name, - ) + flash("new_application_member", user_name=invite.first_name) except AlreadyExistsError: return render_template( diff --git a/atst/utils/flash.py b/atst/utils/flash.py index 623306d5..1e6b1bce 100644 --- a/atst/utils/flash.py +++ b/atst/utils/flash.py @@ -104,9 +104,9 @@ MESSAGES = { "category": "warning", }, "new_application_member": { - "title_template": translate("flash.success"), + "title_template": """{{ "flash.new_application_member.title" | translate({ "user_name": user_name }) }}""", "message_template": """ -

{{ "flash.new_application_member" | translate({ "user_name": user_name, "application_name": application_name }) }}

+

{{ "flash.new_application_member.message" | translate({ "user_name": user_name }) }}

""", "category": "success", }, diff --git a/templates/applications/new/step_1.html b/templates/applications/new/step_1.html index 9ae0ba36..dcf30dac 100644 --- a/templates/applications/new/step_1.html +++ b/templates/applications/new/step_1.html @@ -28,7 +28,7 @@
{{ TextInput(form.name, optional=False) }} - {{ ('portfolios.applications.new.step_1_form_help_text.description' | translate | safe) }} + {{ ('portfolios.applications.new.step_1_form_help_text.name' | translate | safe) }}

diff --git a/translations.yaml b/translations.yaml index a77da2eb..a7b60162 100644 --- a/translations.yaml +++ b/translations.yaml @@ -106,7 +106,7 @@ email: portfolio_invite: "{inviter_name} has invited you to a JEDI cloud portfolio" flash: application: - created: 'You have successfully created the {application_name} application.' + created: '{application_name} has been successfully created. You may continue on to provision environments and assign team members now, or come back and complete these tasks at a later time.' updated: 'You have successfully updated the {application_name} application.' deleted: 'You have successfully deleted the {application_name} application. To view the retained activity log, visit the portfolio administration page.' delete_member_success: 'You have successfully deleted {member_name} from the portfolio.' @@ -118,7 +118,9 @@ flash: new_ppoc_message: 'You have successfully added {ppoc_name} as the primary point of contact. You are no longer the PPoC.' new_ppoc_title: Primary point of contact updated success: Success! - new_application_member: '{user_name} has been added to {application_name}. They will not have access until they accept the invitation e-mailed to them and CSP processing is complete.' + new_application_member: + title: "{user_name}'s invitation has been sent" + message: "{user_name}'s access to this Application is pending until they sign in for the first time." updated_application_team_settings: 'You have updated the {application_name} team settings.' logged_out: Logged out footer: @@ -310,12 +312,12 @@ portfolios: app_settings_text: App settings new: step_1_header: Name and Describe New Application - step_1_button_text: "Save and Add Environments" + step_1_button_text: "Next: Add Environments" step_1_form_help_text: name: |

- The name of your application should be intuitive and easily recognizable for all of your team members. + The name of your Application should be intuitive and easily recognizable for all of your team members.

Writer's Block? A naming example includes: @@ -330,7 +332,7 @@ portfolios: Add a brief one to two sentence description of your application. You should be able to reference your TO Description of Work.

- Writer's Block? A naming example includes: + Writer's Block? A description example includes:

  • Build security applications for FOB Clark
@@ -338,9 +340,9 @@ portfolios:
step_2_header: Add Environments to {application_name} step_2_description: "Production, Staging, Testing, and Development environments are included by default. However, you can add, edit, and delete environments based on the needs of your Application." - step_2_button_text: "Save and Add Members" + step_2_button_text: "Next: Add Members" step_3_header: Invite Members to {application_name} - step_3_description: "To proceed, you will need each member's email address and DOD ID. Within this section, you will also assign application-level permissions and environment-level roles for each member." + step_3_description: "To proceed, you will need each member's email address and DOD ID. Within this section, you will also assign Application-level permissions and environment-level roles for each member." step_3_button_text: Save Application create_new_env: Create a new environment. create_new_env_info: Creating an environment gives you access to the Cloud Service Provider. This environment will function within the constraints of the task order, and any costs will be billed against the portfolio. From 9faf55f2d6c39f6059a12c771b0f9637e0133423 Mon Sep 17 00:00:00 2001 From: graham-dds Date: Wed, 9 Oct 2019 15:16:23 -0400 Subject: [PATCH 04/18] new app step 1 form is submitable with initial data --- js/components/forms/new_application/name_and_description.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/components/forms/new_application/name_and_description.js b/js/components/forms/new_application/name_and_description.js index f39234f9..cabcd92c 100644 --- a/js/components/forms/new_application/name_and_description.js +++ b/js/components/forms/new_application/name_and_description.js @@ -10,6 +10,10 @@ export default { components: { textinput, }, + created: function() { + this.$root.$on('field-change', this.handleFieldChange) + if (this.initialData) this.changed = true + }, data: function() { return { From e6254e6f64cb9cf12995e15576c82f0116e208f3 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 9 Oct 2019 16:26:04 -0400 Subject: [PATCH 05/18] Update text in portfolio header and application sticky CTA --- styles/components/_portfolio_layout.scss | 8 +++++++- templates/applications/base.html | 2 +- templates/components/sticky_cta.html | 9 +-------- templates/portfolios/header.html | 1 + translations.yaml | 1 + 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/styles/components/_portfolio_layout.scss b/styles/components/_portfolio_layout.scss index c1af4db4..292ab5be 100644 --- a/styles/components/_portfolio_layout.scss +++ b/styles/components/_portfolio_layout.scss @@ -29,9 +29,15 @@ &__name { @include h1; h1 { - margin: ($gap * 2) $gap ($gap * 2) $gap; + margin: 0 $gap ($gap * 2) 0; font-size: 3.5rem; } + + p { + font-size: $small-font-size; + margin: 0 0 (-$gap * 0.5); + color: $color-gray-medium; + } } &__budget { diff --git a/templates/applications/base.html b/templates/applications/base.html index a8ef0c7c..4f47e9ad 100644 --- a/templates/applications/base.html +++ b/templates/applications/base.html @@ -5,7 +5,7 @@ {% block portfolio_header %} {% include "portfolios/header.html" %} {% if application %} - {{ StickyCTA(text=application.name, return_link_url=url_for('applications.portfolio_applications', portfolio_id=application.portfolio_id), return_link_text="BACK TO APPLICATIONS") }} + {{ StickyCTA(text=application.name) }} {% endif %} {% endblock %} diff --git a/templates/components/sticky_cta.html b/templates/components/sticky_cta.html index 3d66dd6a..3def43ee 100644 --- a/templates/components/sticky_cta.html +++ b/templates/components/sticky_cta.html @@ -1,14 +1,7 @@ {% from 'components/icon.html' import Icon %} -{% macro StickyCTA(text, context=None, return_link_url=None, return_link_text=None) -%} +{% macro StickyCTA(text, context=None) -%}
- {% if return_link_url and return_link_text %} - - {% endif %}

{{ text }}

diff --git a/templates/portfolios/header.html b/templates/portfolios/header.html index 8e4110b6..45a82e98 100644 --- a/templates/portfolios/header.html +++ b/templates/portfolios/header.html @@ -13,6 +13,7 @@
+

{{ "portfolios.header" | translate }}

{{ portfolio.name }}

diff --git a/translations.yaml b/translations.yaml index 268b7bd0..f9f61da5 100644 --- a/translations.yaml +++ b/translations.yaml @@ -424,6 +424,7 @@ portfolios: empty: start_button: Start a new JEDI portfolio title: You have no apps yet + header: PORTFOLIO members: archive_button: Delete member permissions: From c3db3322df4650f0073103c6d78fd132bccb6736 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Wed, 9 Oct 2019 16:47:20 -0400 Subject: [PATCH 06/18] Style portfolio header menu icons --- static/icons/applications.svg | 14 +------------- static/icons/funding.svg | 14 +------------- styles/components/_portfolio_layout.scss | 19 ++++++++++++++----- templates/portfolios/header.html | 18 +++++++++--------- translations.yaml | 4 ++-- 5 files changed, 27 insertions(+), 42 deletions(-) diff --git a/static/icons/applications.svg b/static/icons/applications.svg index d0768feb..b747f80b 100644 --- a/static/icons/applications.svg +++ b/static/icons/applications.svg @@ -1,13 +1 @@ - - - - Combined Shape - Created with Sketch. - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/static/icons/funding.svg b/static/icons/funding.svg index a765aeb7..ae7cf81e 100644 --- a/static/icons/funding.svg +++ b/static/icons/funding.svg @@ -1,13 +1 @@ - - - - Shape - Created with Sketch. - - - - - - - - \ No newline at end of file + diff --git a/styles/components/_portfolio_layout.scss b/styles/components/_portfolio_layout.scss index 292ab5be..fac56c0b 100644 --- a/styles/components/_portfolio_layout.scss +++ b/styles/components/_portfolio_layout.scss @@ -75,17 +75,26 @@ font-size: $small-font-size; .icon-link { - padding: 0.8rem 1.6rem; + padding: $gap; + border-radius: 0; + color: $color-blue-darkest; + + &:hover { + background-color: $color-aqua-lightest; + } - color: $color-gray; - opacity: 0.3; .icon { - @include icon-color($color-gray); + @include icon-color($color-blue-darkest); } &.active { - opacity: 1; color: $color-blue; + background-color: $color-gray-lightest; + + &:hover { + background-color: $color-aqua-lightest; + } + .icon { @include icon-color($color-blue); } diff --git a/templates/portfolios/header.html b/templates/portfolios/header.html index 45a82e98..63684d92 100644 --- a/templates/portfolios/header.html +++ b/templates/portfolios/header.html @@ -18,7 +18,14 @@
diff --git a/translations.yaml b/translations.yaml index f9f61da5..7c5e21f1 100644 --- a/translations.yaml +++ b/translations.yaml @@ -283,8 +283,8 @@ login: navigation: portfolio_navigation: breadcrumbs: - admin: Admin - funding: Funding + admin: Settings + funding: Task Orders reports: Reports applications: Applications topbar: From 5a98e6966ee8bb1ef9ff858917b5ed7208a00018 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Thu, 10 Oct 2019 11:11:53 -0400 Subject: [PATCH 07/18] Styling for name and description section: As part of this, the empty placeholder span was removed from the text input macro and the span will now be conditionall rendered if there is an error message --- styles/components/_portfolio_layout.scss | 7 +------ styles/core/_grid.scss | 4 ++++ templates/applications/settings.html | 25 ++++++++---------------- templates/components/text_input.html | 10 +++------- translations.yaml | 6 +++--- 5 files changed, 19 insertions(+), 33 deletions(-) diff --git a/styles/components/_portfolio_layout.scss b/styles/components/_portfolio_layout.scss index fac56c0b..d2a1998b 100644 --- a/styles/components/_portfolio_layout.scss +++ b/styles/components/_portfolio_layout.scss @@ -136,7 +136,7 @@ } .portfolio-content { - margin: 1 * $gap $gap 0 $gap; + margin: (4 * $gap) $gap 0 $gap; .panel { @include shadow-panel; @@ -148,11 +148,6 @@ padding-bottom: 0; } - .subheading { - font-size: 1.4rem; - color: $color-gray; - } - .responsive-table-wrapper { padding-bottom: $gap * 3; margin-bottom: 0; diff --git a/styles/core/_grid.scss b/styles/core/_grid.scss index f7037d42..ef264cd8 100644 --- a/styles/core/_grid.scss +++ b/styles/core/_grid.scss @@ -44,4 +44,8 @@ flex-grow: 1; padding-right: $spacing-small; } + + &.col--half { + width: 50%; + } } diff --git a/templates/applications/settings.html b/templates/applications/settings.html index 362d4e7b..06c47b8e 100644 --- a/templates/applications/settings.html +++ b/templates/applications/settings.html @@ -19,26 +19,16 @@ {% block application_content %} -
{{ 'portfolios.applications.settings.name_description' | translate }}
+

{{ 'portfolios.applications.settings.name_description' | translate }}

{% if user_can(permissions.EDIT_APPLICATION) %} -
-
-
- {{ application_form.csrf_token }} -
-
- {{ TextInput(application_form.name, optional=False) }} - {{ TextInput(application_form.description, paragraph=True, optional=True) }} -
-
-
- + + {{ application_form.csrf_token }} + {{ TextInput(application_form.name, optional=False) }} + {{ TextInput(application_form.description, paragraph=True, optional=True, showOptional=False) }} +
+ {{ SaveButton('common.save_changes'|translate) }}
@@ -71,6 +61,7 @@
{% endif %} +
{{ MemberManagementTemplate( application, diff --git a/templates/components/text_input.html b/templates/components/text_input.html index 9b9cb279..69ebd727 100644 --- a/templates/components/text_input.html +++ b/templates/components/text_input.html @@ -15,6 +15,7 @@ classes='', noMaxWidth=False, optional=True, + showOptional=True, showLabel=True, watch=False, show_validation=True) -%} @@ -40,7 +41,7 @@