Remove the weird table from the send SMS page

It was weird.
This commit is contained in:
Chris Hill-Scott
2016-02-18 17:33:43 +00:00
parent 8123359eb2
commit 5af03b28f3
2 changed files with 4 additions and 31 deletions
-9
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'] 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( return render_template(
'views/send-sms.html', 'views/send-sms.html',
template=template, template=template,
column_headers=['phone'] + template.placeholders_as_markup, column_headers=['phone'] + template.placeholders_as_markup,
placeholders=template.placeholders,
example_data=example_data,
form=form, form=form,
service_id=service_id service_id=service_id
) )
+4 -22
View File
@@ -22,32 +22,14 @@
{{file_upload(form.file, button_text='Choose a CSV file')}} {{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( {{ page_footer(
"Continue to preview" "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> </form>
{% endblock %} {% endblock %}