Grey out None when email reply to not set

This is consistent with how we differentiate other ‘unset’ values on the
settings page.
This commit is contained in:
Chris Hill-Scott
2017-09-26 15:08:21 +01:00
parent f9390b4fc5
commit 8fb55ffa78
3 changed files with 26 additions and 5 deletions

View File

@@ -45,7 +45,8 @@
{% call row() %}
{{ text_field('Email reply to address') }}
{% call field() %}
{% call field(status='default' if default_reply_to_email_address == "None" else '') %}
{{ default_reply_to_email_address }}
{% if reply_to_email_address_count > 1 %}
<div class="hint">

View File

@@ -22,7 +22,7 @@
<div class="bottom-gutter-3-2 body-copy-table">
{% call(item, row_number) list_table(
reply_to_email_addresses,
empty_message="You havent added any email addresses yet.",
empty_message="You havent added any email reply to addresses yet",
caption="Reply to email addresses",
caption_visible=false,
field_headings=[
@@ -39,7 +39,27 @@
</span>
{% endif %}
{% endcall %}
{{ edit_field('Change', url_for('.service_edit_email_reply_to', service_id =current_service.id, reply_to_email_id = item.id)) }}
{{ edit_field('Change', url_for('.service_edit_email_reply_to', service_id =current_service.id, reply_to_email_id = item.id)) }}
{% endcall %}
</div>
{% endblock %}
<div class="grid-row">
<div class="column-five-sixths">
<p>
Your emails will be sent from
{{ current_service.email_from }}@notifications.service.gov.uk
</p>
<p>
This is so they have the best chance of being delivered.
This email address cant receive replies.
</p>
<p>
Set up separate email addresses to receive replies
from your users.
{% if current_service.restricted and not reply_to_email_addresses %}
Your service cant go live until youve added at least one
reply to address.
{% endif %}
</p>
</div>
</div>
{% endblock %}

View File

@@ -713,7 +713,7 @@ def test_no_reply_to_email_addresses_message_shows(
service_id=SERVICE_ONE_ID
)
assert normalize_spaces(page.select('tbody tr')[0].text) == "You havent added any email addresses yet."
assert normalize_spaces(page.select('tbody tr')[0].text) == "You havent added any email reply to addresses yet"
assert len(page.select('tbody tr')) == 1