diff --git a/app/assets/javascripts/radioSelect.js b/app/assets/javascripts/radioSelect.js index e8e212257..c0bf0cb5e 100644 --- a/app/assets/javascripts/radioSelect.js +++ b/app/assets/javascripts/radioSelect.js @@ -38,7 +38,7 @@ {{/choices}} - + `), 'chosen': Hogan.compile(` diff --git a/app/assets/sass/uswds/_main.scss b/app/assets/sass/uswds/_main.scss index 585d0ee63..2933f8316 100644 --- a/app/assets/sass/uswds/_main.scss +++ b/app/assets/sass/uswds/_main.scss @@ -351,6 +351,10 @@ h2.recipient-list { margin-top: units(1); } +.usa-search .search-form__button { + height: 40px; +} + // Button ellipses loading .dot-anim { display: inline-block; diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 31cbeb3fa..737d45172 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -179,10 +179,19 @@ td.table-empty-message { display: flex; flex-wrap: wrap; justify-content: space-between; - padding: 1rem; + padding: 1rem 0; } .user-list-item { + border: 2px solid color('gray-5'); + padding: units(2); + button, .usa-accordion__content { + background-color: white; + border: 2px solid color('gray-5'); + } + button:hover, button[aria-expanded="true"] { + background-color: color('gray-5'); + } @include at-media(desktop) { width: calc(50% - units(1)); margin-bottom: 1rem; @@ -199,7 +208,6 @@ td.table-empty-message { } .hint { - display: block; font-size: size('body', 'sm'); font-weight: normal; } diff --git a/app/templates/base.html b/app/templates/base.html index ef8ca8998..b647a21a8 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -65,7 +65,7 @@ {% endblock %} {% block main %} -
+
{% block beforeContent %} {% block backLink %}{% endblock %} {% endblock %} diff --git a/app/templates/views/find-services/find-services-by-name.html b/app/templates/views/find-services/find-services-by-name.html index 24970749f..0629c5264 100644 --- a/app/templates/views/find-services/find-services-by-name.html +++ b/app/templates/views/find-services/find-services-by-name.html @@ -14,19 +14,22 @@ - {% call form_wrapper( - action=url_for('.find_services_by_name'), - class='usa-search margin-bottom-4' - ) %} - {{ form.search(param_extensions={ - "label": {"text": "Find services by name, partial name, or service ID"} - }) }} - - {{ usaButton({ - "text": "Search", - "classes": "usa-button search-form__button" - }) }} - {% endcall %} + {% call form_wrapper( + action=url_for('.find_services_by_name'), + class='usa-search margin-bottom-4' +) %} +
+ {{ form.search(param_extensions={ + "label": {"text": "Find services by name, partial name, or service ID"}, + "classes": "width-full" + }) }} + + {{ usaButton({ + "text": "Search", + "classes": "usa-button search-form__button" + }) }} +
+{% endcall %} {% call form_wrapper(id='search-form' ) %} diff --git a/app/templates/views/find-users/find-users-by-email.html b/app/templates/views/find-users/find-users-by-email.html index e4815b35d..d77dd50d2 100644 --- a/app/templates/views/find-users/find-users-by-email.html +++ b/app/templates/views/find-users/find-users-by-email.html @@ -15,17 +15,20 @@ {% call form_wrapper( - action=url_for('.find_users_by_email'), - class='usa-search margin-bottom-4' + action=url_for('.find_users_by_email'), + class='usa-search margin-bottom-4' ) %} +
{{ form.search(param_extensions={ - "label": {"text": "Find users by email, or by partial email"} + "label": {"text": "Find users by email, or by partial email"}, + "classes": "width-full" }) }} {{ usaButton({ "text": "Search", - "classes": "search-form__button" + "classes": "usa-button search-form__button" }) }} +
{% endcall %} {% call form_wrapper(id='search-form' ) %} diff --git a/app/templates/views/manage-users.html b/app/templates/views/manage-users.html index 4b36e25eb..5e73dd2d4 100644 --- a/app/templates/views/manage-users.html +++ b/app/templates/views/manage-users.html @@ -35,73 +35,95 @@
{% endif %} +
{% for user in users %} -
{% if user.status != 'cancelled' %} -
-

+
+

{%- if user.name -%} - {{ user.name }} + {{ user.name }} {%- endif -%} - {%- if user.status == 'pending' -%} - {{ user.email_address }}(invited) - {%- elif user.status == 'cancelled' -%} - {{ user.email_address }}(cancelled invite) +

+

+ {%- if user.status == 'pending' -%} + {{ user.email_address }} + (invited) {%- elif user.status == 'expired' -%} - {{ user.email_address }}(expired invite) + {{ user.email_address }} + (expired invite) {%- elif user.id == current_user.id -%} - (you) - {% else %} + {{ user.email_address }} + (you) + {%- else -%} {{ user.email_address }} {% endif %} -

-

Permissions

-
    - {% for permission, label in permissions %} - {{ tick_cross( - user.has_permission_for_service(current_service.id, permission), - label - ) }} - {% endfor %} -
- {# only show if the service has folders #} - {% if current_service.all_template_folders %} -

- {% set folder_count = user.template_folders_for_service(current_service) | length %} - {% if folder_count == 0 %} - Cannot see any folders - {% elif folder_count != current_service.all_template_folders | length %} - Can see {{ folder_count }} folder{% if folder_count > 1 %}s{% endif %} - {% else %} - Can see all folders - {% endif%} -

- {% endif %} - {% if current_service.has_permission('email_auth') %} -

- Signs in with - {{ user.auth_type | format_auth_type(with_indefinite_article=True) }} -

- {% endif %} - {% if current_service.has_permission('email_auth') %} -

- Signs in with - {{ user.auth_type | format_auth_type(with_indefinite_article=True) }} -

- {% endif %} - {% if current_user.has_permissions('manage_service') %} - {% if user.status == 'pending' or user.status == 'expired' %} - Cancel invitation for {{ user.email_address }} +

+ +
+

+ +

+ +
+ + + + {% if current_user.has_permissions('manage_service') %} + {% if user.status == 'pending' or user.status == 'expired' %} + + Cancel invitation for {{ user.email_address }} + {% endif %} + + {% if user.status == 'expired' %} + + Resend invite for {{ user.email_address }} + + {% elif user.is_editable_by(current_user) %} + + Change details for {{ user.name }} {{ user.email_address }} + + {% endif %} + {% endif %}
{% endif %} -
{% endfor %} +
+ {% endblock %} diff --git a/tests/app/main/views/test_manage_users.py b/tests/app/main/views/test_manage_users.py index ba241ccdf..653e7592b 100644 --- a/tests/app/main/views/test_manage_users.py +++ b/tests/app/main/views/test_manage_users.py @@ -27,7 +27,8 @@ from tests.conftest import ( ( create_active_user_with_permissions(), ( - "Test User(you) " + + "Test User test@user.gsa.gov (you) " "Permissions " "Can See dashboard " "Can Send messages " @@ -38,18 +39,18 @@ from tests.conftest import ( ), ( create_active_user_empty_permissions(), - ("Test User With Empty Permissions(you) " "Permissions"), + ("Test User With Empty Permissions test@user.gsa.gov (you) " "Permissions"), False, ), ( create_active_user_view_permissions(), - ("Test User With Permissions(you) " "Permissions " "Can See dashboard"), + ("Test User With Permissions test@user.gsa.gov (you) " "Permissions " "Can See dashboard"), False, ), ( create_active_user_manage_template_permissions(), ( - "Test User With Permissions(you) " + "Test User With Permissions test@user.gsa.gov (you) " "Permissions " "Can See dashboard " "Can Add and edit templates" @@ -231,7 +232,7 @@ def test_should_show_caseworker_on_overview_page( assert normalize_spaces(page.select_one("h1").text) == "Team members" assert normalize_spaces(page.select(".user-list-item")[0].text) == ( - "Test User With Permissions(you) " "Permissions " "Can See dashboard" + "Test User With Permissions test@user.gsa.gov (you) " "Permissions " "Can See dashboard" ) # [1:5] are invited users assert normalize_spaces(page.select(".user-list-item")[6].text) == ( @@ -1233,7 +1234,7 @@ def test_cancel_invited_user_doesnt_work_if_user_not_invited_to_this_service( ( "pending", ( - "invited_user@test.gsa.gov(invited) " + "invited_user@test.gsa.gov (invited) " "Permissions " "Can See dashboard " "Can Send messages " diff --git a/tests/javascripts/radioSelect.test.js b/tests/javascripts/radioSelect.test.js index ae16e7478..778f1f6a0 100644 --- a/tests/javascripts/radioSelect.test.js +++ b/tests/javascripts/radioSelect.test.js @@ -244,7 +244,7 @@ describe('RadioSelect', () => { const button = document.querySelector('.radio-select__column:nth-child(2) input[type=button]'); expect(button).not.toBeNull(); - expect(button.getAttribute('value')).toEqual('Done'); + expect(button.getAttribute('value')).toEqual('Back to select a new time'); expect(button.getAttribute('aria-expanded')).toEqual('true'); });