Remove the weird table from the send SMS page

It was weird.
This commit is contained in:
Chris Hill-Scott
2016-02-18 17:29:16 +00:00
parent 8123359eb2
commit 5af03b28f3
2 changed files with 4 additions and 31 deletions

View File

@@ -70,19 +70,10 @@ def send_sms(service_id, template_id):
templates_dao.get_service_template_or_404(service_id, template_id)['data']
)
example_data = [dict(
phone=current_user.mobile_number,
**{
header: "test {}".format(header) for header in template.placeholders
}
)]
return render_template(
'views/send-sms.html',
template=template,
column_headers=['phone'] + template.placeholders_as_markup,
placeholders=template.placeholders,
example_data=example_data,
form=form,
service_id=service_id
)

View File

@@ -22,32 +22,14 @@
{{file_upload(form.file, button_text='Choose a CSV file')}}
<p>
<a href="{{ url_for('.get_example_csv', service_id=service_id, template_id=template.id) }}">Download an example CSV file</a>
</p>
{{ page_footer(
"Continue to preview"
) }}
{% if column_headers %}
{% call(item) list_table(
example_data,
caption='Example',
field_headings=column_headers,
field_headings_visible=True,
caption_visible=True,
empty_message="Your data here"
) %}
{% call field() %}
{{ item.phone }}
{% endcall %}
{% for column in template.placeholders %}
{% call field() %}
{{ item.get(column) }}
{% endcall %}
{% endfor %}
{% endcall %}
{% endif %}
<p class="table-show-more-link">
<a href="{{ url_for('.get_example_csv', service_id=service_id, template_id=template.id) }}">Download this CSV file</a>
</p>
</form>
{% endblock %}