Content changes following consultation with content and design pros :)

This commit is contained in:
Pea Tyczynska
2019-02-20 17:34:58 +00:00
parent 446a17d801
commit 4faf44b5c5
5 changed files with 28 additions and 23 deletions

View File

@@ -14,7 +14,7 @@
</h1> </h1>
<p> <p>
{{ user.email_address }} {{ user.email_address }}&emsp;<a href="{{ url_for('.edit_user_email', service_id=current_service.id, user_id=user.id)}}">Change</a>
</p> </p>
<div class="grid-row"> <div class="grid-row">

View File

@@ -63,9 +63,7 @@
{% if user.status == 'pending' %} {% if user.status == 'pending' %}
<a href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id)}}">Cancel invitation</a> <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 %} {% 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> <a href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Edit team member</a>
<br>
<a href="{{ url_for('.edit_user_email', service_id=current_service.id, user_id=user.id)}}">Edit user email</a>
{% endif %} {% endif %}
</li> </li>
{% endif %} {% endif %}

View File

@@ -1,20 +1,23 @@
{% extends "org_template.html" %} {% extends "withnav_template.html" %}
{% from "components/page-footer.html" import page_footer %} {% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %} {% from "components/form.html" import form_wrapper %}
{% block per_page_title %} {% block per_page_title %}
Confirm changes to user email Confirm change of email address
{% endblock %} {% endblock %}
{% block maincolumn_content %} {% 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="grid-row">
<div class="column-three-quarters"> <div class="column-whole">
{% call form_wrapper() %} {% 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( {{ page_footer(
'Confirm', 'Confirm',
destructive=destructive, destructive=destructive,

View File

@@ -1,24 +1,24 @@
{% extends "org_template.html" %} {% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %} {% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %} {% from "components/page-footer.html" import page_footer %}
{% from "components/form.html" import form_wrapper %} {% from "components/form.html" import form_wrapper %}
{% block per_page_title %} {% block per_page_title %}
Edit user email address Change team members email address
{% endblock %} {% endblock %}
{% block maincolumn_content %} {% block maincolumn_content %}
<h1 class="heading-large">Edit user email address</h1> <h1 class="heading-large">Change team members email address</h1>
<p id="user_name">for {{ user.name }}</p> <p id="user_name">This will change the email address for {{ user.name }}.</p>
<div class="grid-row"> <div class="grid-row">
<div class="column-three-quarters"> <div class="column-three-quarters">
{% call form_wrapper() %} {% call form_wrapper() %}
{{ textbox(form.email_address) }} {{ textbox(form.email_address) }}
{{ page_footer( {{ page_footer(
'Save', 'Save',
back_link=url_for('.manage_users', service_id=service_id), back_link=url_for('.edit_user_permissions', service_id=service_id, user_id=user.id),
back_link_text="Back to team members" back_link_text="Back"
) }} ) }}
{% endcall %} {% endcall %}
</div> </div>

View File

@@ -39,7 +39,7 @@ from tests.conftest import service_one as create_sample_service
'Cant Add and edit templates ' 'Cant Add and edit templates '
'Cant Manage settings, team and usage ' 'Cant Manage settings, team and usage '
'Cant Manage API integration ' 'Cant 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 user_id=test_user.id
) )
assert page.find('h1').text == "Edit user email address" assert page.find('h1').text == "Change team members email address"
assert page.select('p[id=user_name]')[0].text == "for " + user.name 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('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( 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 user_id=active_user_with_permissions.id
)) ))
assert 'Confirm changes to user email' in response.get_data(as_text=True) assert 'Confirm change of email address' in response.get_data(as_text=True)
assert 'Email address for {} will be changed from "{}" to "{}".'.format( for text in [
active_user_with_permissions.name, active_user_with_permissions.email_address, new_email 'New email address:',
) in response.get_data(as_text=True) 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 'Confirm' in response.get_data(as_text=True)
assert response.status_code == 200 assert response.status_code == 200