From fcadab3ce88e3d0eeee5aaf0be81e16abe6bfa69 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 12 Nov 2019 16:59:39 +0000 Subject: [PATCH] Remove spreadsheet example from breaking change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we’re only showing this page to team who are using the API we don’t have to worry about explaining what’s going on in terms of the spreadsheet any more. This makes the page simpler. --- app/main/views/templates.py | 11 +------ .../views/templates/breaking-change.html | 29 ++----------------- tests/app/main/views/test_templates.py | 2 -- 3 files changed, 3 insertions(+), 39 deletions(-) diff --git a/app/main/views/templates.py b/app/main/views/templates.py index b6b1fb2c7..d0a953b28 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -609,20 +609,11 @@ def edit_service_template(service_id, template_id): not request.form.get('confirm') and current_service.api_keys ): - example_column_headings = ( - first_column_headings[new_template.template_type] + list(new_template.placeholders) - ) return render_template( 'views/templates/breaking-change.html', template_change=template_change, new_template=new_template, - column_headings=list(ascii_uppercase[:len(example_column_headings)]), - example_rows=[ - example_column_headings, - get_example_csv_rows(new_template), - get_example_csv_rows(new_template) - ], - form=form + form=form, ) try: service_api_client.update_service_template( diff --git a/app/templates/views/templates/breaking-change.html b/app/templates/views/templates/breaking-change.html index 7810774be..0f95b7d24 100644 --- a/app/templates/views/templates/breaking-change.html +++ b/app/templates/views/templates/breaking-change.html @@ -2,7 +2,6 @@ {% from "components/banner.html" import banner_wrapper %} {% from "components/page-header.html" import page_header %} {% from "components/page-footer.html" import page_footer %} -{% from "components/table.html" import list_table, text_field, index_field, index_field_heading %} {% from "components/list.html" import list_of_placeholders %} {% from "components/form.html" import form_wrapper %} @@ -30,6 +29,8 @@ {% endif %} +

Developers, you’ll need to update your API calls

+ {% call form_wrapper() %} @@ -40,30 +41,4 @@ {{ page_footer('Save changes to template') }} {% endcall %} -

- When you send messages using this template you’ll need - {{ column_headings|length }} - column{{ 's' if column_headings|length > 1 else '' }} of data: -

- -
- {% call(item, row_number) list_table( - example_rows, - caption="Example", - caption_visible=False, - field_headings=[''] + column_headings - ) %} - {% if 1 == row_number %} - {{ index_field('') }} - {% else %} - {{ index_field(row_number - 1) }} - {% endif %} - {% for column in item %} - {{ text_field(column) }} - {% endfor %} - {% endcall %} -
- -

Developers, you’ll need to update your API calls

- {% endblock %} diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py index 9c6ac9968..4af70b5de 100644 --- a/tests/app/main/views/test_templates.py +++ b/tests/app/main/views/test_templates.py @@ -1483,7 +1483,6 @@ def test_should_403_when_create_template_with_process_type_of_priority_for_non_p [ 'You removed ((date))', 'You added ((name))', - 'When you send messages using this template you’ll need 3 columns of data:', ] ), ( @@ -1492,7 +1491,6 @@ def test_should_403_when_create_template_with_process_type_of_priority_for_non_p [ 'You removed ((date))', 'You added ((name))', - 'When you send messages using this template you’ll need 9 columns of data:', ] ), ])