mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-09 19:04:33 -04:00
Content changes following consultation with content and design pros :)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</h1>
|
||||
|
||||
<p>
|
||||
{{ user.email_address }}
|
||||
{{ user.email_address }} <a href="{{ url_for('.edit_user_email', service_id=current_service.id, user_id=user.id)}}">Change</a>
|
||||
</p>
|
||||
|
||||
<div class="grid-row">
|
||||
|
||||
@@ -63,9 +63,7 @@
|
||||
{% if user.status == 'pending' %}
|
||||
<a href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id)}}">Cancel invitation</a>
|
||||
{% elif user.state == 'active' and current_user.id != user.id %}
|
||||
<a href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Edit permissions</a>
|
||||
<br>
|
||||
<a href="{{ url_for('.edit_user_email', service_id=current_service.id, user_id=user.id)}}">Edit user email</a>
|
||||
<a href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Edit team member</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
{% extends "org_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Confirm changes to user email
|
||||
Confirm change of email address
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">Confirm changes to user email</h1>
|
||||
<h1 class="heading-large">Confirm change of email address</h1>
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-three-quarters">
|
||||
|
||||
<div class="column-whole">
|
||||
{% call form_wrapper() %}
|
||||
<p> Email address for {{ user.name }} will be changed from "{{ user.email_address }}" to "{{ new_email }}".</p>
|
||||
<p>New email address:</p>
|
||||
<div class="panel panel-border-wide bottom-gutter">
|
||||
<p>{{ new_email }}</p>
|
||||
</div>
|
||||
<p>We will send {{ user.name }} an email to tell them about the change.</p>
|
||||
{{ page_footer(
|
||||
'Confirm',
|
||||
destructive=destructive,
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
{% extends "org_template.html" %}
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Edit user email address
|
||||
Change team member’s email address
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-large">Edit user email address</h1>
|
||||
<p id="user_name">for {{ user.name }}</p>
|
||||
<h1 class="heading-large">Change team member’s email address</h1>
|
||||
<p id="user_name">This will change the email address for {{ user.name }}.</p>
|
||||
<div class="grid-row">
|
||||
<div class="column-three-quarters">
|
||||
{% call form_wrapper() %}
|
||||
{{ textbox(form.email_address) }}
|
||||
{{ page_footer(
|
||||
'Save',
|
||||
back_link=url_for('.manage_users', service_id=service_id),
|
||||
back_link_text="Back to team members"
|
||||
back_link=url_for('.edit_user_permissions', service_id=service_id, user_id=user.id),
|
||||
back_link_text="Back"
|
||||
) }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
@@ -39,7 +39,7 @@ from tests.conftest import service_one as create_sample_service
|
||||
'Can’t Add and edit templates '
|
||||
'Can’t Manage settings, team and usage '
|
||||
'Can’t Manage API integration '
|
||||
'Edit permissions Edit user email'
|
||||
'Edit team member'
|
||||
)
|
||||
),
|
||||
(
|
||||
@@ -786,9 +786,10 @@ def test_edit_user_email_page(
|
||||
user_id=test_user.id
|
||||
)
|
||||
|
||||
assert page.find('h1').text == "Edit user email address"
|
||||
assert page.select('p[id=user_name]')[0].text == "for " + user.name
|
||||
assert page.find('h1').text == "Change team member’s email address"
|
||||
assert page.select('p[id=user_name]')[0].text == "This will change the email address for {}.".format(user.name)
|
||||
assert page.select('input[type=email]')[0].attrs["value"] == user.email_address
|
||||
assert page.select('button[type=submit]')[0].text == "Save"
|
||||
|
||||
|
||||
def test_edit_user_email_redirects_to_confirmation(
|
||||
@@ -828,10 +829,13 @@ def test_confirm_edit_user_email_page(
|
||||
user_id=active_user_with_permissions.id
|
||||
))
|
||||
|
||||
assert 'Confirm changes to user email' in response.get_data(as_text=True)
|
||||
assert 'Email address for {} will be changed from "{}" to "{}".'.format(
|
||||
active_user_with_permissions.name, active_user_with_permissions.email_address, new_email
|
||||
) in response.get_data(as_text=True)
|
||||
assert 'Confirm change of email address' in response.get_data(as_text=True)
|
||||
for text in [
|
||||
'New email address:',
|
||||
new_email,
|
||||
'We will send {} an email to tell them about the change.'.format(active_user_with_permissions.name)
|
||||
]:
|
||||
assert text in response.get_data(as_text=True)
|
||||
assert 'Confirm' in response.get_data(as_text=True)
|
||||
assert response.status_code == 200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user