Remove spreadsheet example from breaking change

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.
This commit is contained in:
Chris Hill-Scott
2019-11-12 16:59:39 +00:00
parent dbc85fcc1f
commit fcadab3ce8
3 changed files with 3 additions and 39 deletions

View File

@@ -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(

View File

@@ -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 %}
</div>
<p class="top-gutter">Developers, youll need to update your API calls</p>
{% call form_wrapper() %}
<input type="hidden" name="name" value="{{ new_template.name }}" />
<input type="hidden" name="subject" value="{{ new_template._subject or '' }}" />
@@ -40,30 +41,4 @@
{{ page_footer('Save changes to template') }}
{% endcall %}
<p>
When you send messages using this template youll need
{{ column_headings|length }}
column{{ 's' if column_headings|length > 1 else '' }} of data:
</p>
<div class="spreadsheet fullscreen-content" data-module="fullscreen-table"">
{% 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 %}
</div>
<p class="top-gutter">Developers, youll need to update your API calls</p>
{% endblock %}

View File

@@ -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 youll 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 youll need 9 columns of data:',
]
),
])