From c9d0c64c1f44bc0fe389bb57d528578a1c4c7368 Mon Sep 17 00:00:00 2001 From: leigh-mil Date: Mon, 6 Jan 2020 13:54:12 -0500 Subject: [PATCH] Fix and generalize styling for member form macro Only display permissions with 'Edit' value Delete unused files and rename MemberForm macro file --- styles/atat.scss | 1 + styles/components/_member_form.scss | 55 +++++++++++++++++ styles/sections/_application_edit.scss | 60 ------------------- .../fragments/member_form_fields.html | 2 +- templates/applications/fragments/members.html | 2 +- ...er_form_template.html => member_form.html} | 20 ++++--- .../fragments/add_new_portfolio_member.html | 4 +- .../portfolios/fragments/members_edit.html | 38 ------------ .../portfolios/fragments/members_view.html | 26 -------- .../fragments/portfolio_members.html | 6 +- 10 files changed, 75 insertions(+), 139 deletions(-) create mode 100644 styles/components/_member_form.scss rename templates/components/{member_form_template.html => member_form.html} (71%) delete mode 100644 templates/portfolios/fragments/members_edit.html delete mode 100644 templates/portfolios/fragments/members_view.html diff --git a/styles/atat.scss b/styles/atat.scss index 4c8aa263..0134dd89 100644 --- a/styles/atat.scss +++ b/styles/atat.scss @@ -38,6 +38,7 @@ @import "components/dod_login_notice.scss"; @import "components/sticky_cta.scss"; @import "components/error_page.scss"; +@import "components/member_form.scss"; @import "sections/login"; @import "sections/home"; diff --git a/styles/components/_member_form.scss b/styles/components/_member_form.scss new file mode 100644 index 00000000..c734cfd1 --- /dev/null +++ b/styles/components/_member_form.scss @@ -0,0 +1,55 @@ +.member-form { + text-align: left; + min-width: 75rem; + + input[type="checkbox"] + label::before { + margin-left: 0; + } + + .input__inline-fields { + text-align: left; + + .usa-input__choices label { + font-weight: $font-bold; + } + } + + .input__inline-fields { + padding: $gap * 2; + border: 1px solid $color-gray-lighter; + + &.checked { + border: 1px solid $color-blue; + } + + label { + font-weight: $font-bold; + } + + p.usa-input__help { + margin-bottom: 0; + padding-left: 3rem; + } + } + + .user-info { + .usa-input { + width: 45rem; + + input, + label, + .usa-input__message { + max-width: unset; + } + + label .icon-validation { + left: unset; + right: -$gap * 4; + } + + &--validation--phoneExt { + width: 18rem; + } + } + } +} diff --git a/styles/sections/_application_edit.scss b/styles/sections/_application_edit.scss index 8ff79b7b..8282cb64 100644 --- a/styles/sections/_application_edit.scss +++ b/styles/sections/_application_edit.scss @@ -23,66 +23,6 @@ } } -#modal--add-app-mem, -.form-content--app-mem { - text-align: left; - - .modal__body { - min-width: 75rem; - } - - input[type="checkbox"] + label::before { - margin-left: 0; - } - - .input__inline-fields { - text-align: left; - - .usa-input__choices label { - font-weight: $font-bold; - } - } - - .input__inline-fields { - padding: $gap * 2; - border: 1px solid $color-gray-lighter; - - &.checked { - border: 1px solid $color-blue; - } - - label { - font-weight: $font-bold; - } - - p.usa-input__help { - margin-bottom: 0; - padding-left: 3rem; - } - } - - .application-member__user-info { - .usa-input { - width: 45rem; - - input, - label, - .usa-input__message { - max-width: unset; - } - - label .icon-validation { - left: unset; - right: -$gap * 4; - } - - &--validation--phoneExt { - width: 18rem; - } - } - } -} - .environment-roles { padding: 0 ($gap * 3) ($gap * 3); diff --git a/templates/applications/fragments/member_form_fields.html b/templates/applications/fragments/member_form_fields.html index 3aa97687..707653fa 100644 --- a/templates/applications/fragments/member_form_fields.html +++ b/templates/applications/fragments/member_form_fields.html @@ -118,7 +118,7 @@ {% endmacro %} {% macro InfoFields(member_form) %} -
+