diff --git a/app/main/views/email_branding.py b/app/main/views/email_branding.py index ffa36d885..62b278a9f 100644 --- a/app/main/views/email_branding.py +++ b/app/main/views/email_branding.py @@ -30,13 +30,10 @@ def email_branding(): form = ServiceSelectEmailBranding() email_brandings = get_branding_as_value_and_label(brandings) - form.email_branding.choices = email_brandings + [('None', 'Create a new email branding')] + form.email_branding.choices = email_brandings if form.validate_on_submit(): - if form.email_branding.data != 'None': - return redirect(url_for('.update_email_branding', branding_id=form.email_branding.data)) - else: - return redirect(url_for('.create_email_branding')) + return redirect(url_for('.update_email_branding', branding_id=form.email_branding.data)) return render_template( 'views/email-branding/select-branding.html', diff --git a/app/templates/views/email-branding/select-branding.html b/app/templates/views/email-branding/select-branding.html index ec846151e..16324b893 100644 --- a/app/templates/views/email-branding/select-branding.html +++ b/app/templates/views/email-branding/select-branding.html @@ -4,15 +4,19 @@ {% from "components/live-search.html" import live_search %} {% block service_page_title %} - Select email branding + Email branding {% endblock %} {% block platform_admin_content %} -

-
Select an email branding to update
-
or create a new email branding
-

+
+
+

Email branding

+
+
+ Add new brand +
+
diff --git a/tests/app/main/views/test_email_branding.py b/tests/app/main/views/test_email_branding.py index 9bef00beb..6e652611c 100644 --- a/tests/app/main/views/test_email_branding.py +++ b/tests/app/main/views/test_email_branding.py @@ -25,14 +25,15 @@ def test_email_branding_page_shows_full_branding_list( assert normalize_spaces( page.select_one('h1').text - ) == "Select an email branding to update or create a new email branding" + ) == "Email branding" + + assert page.select_one('.column-three-quarters a')['href'] == url_for('main.create_email_branding') first_label = radio_labels[0] assert normalize_spaces(first_label.text) == 'org 1' assert brand_names == [ - 'org 1', 'org 2', 'org 3', 'org 4', 'org 5', 'Create a new email branding'] - - assert normalize_spaces((radio_labels[-1]).text) == 'Create a new email branding' + 'org 1', 'org 2', 'org 3', 'org 4', 'org 5' + ] def test_edit_email_branding_shows_the_correct_branding_info(