mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Check CSV files match the template
This commit adds a first stab at checking whether a CSV file has the right data to fill the placeholders. The UI is very much first bash, but I’d like to get this merged and see how it feels. The main thing is that we’ve got all the bit in place now to do this logic.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{% from "components/sms-message.html" import sms_message %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/file-upload.html" import file_upload %}
|
||||
{% from "components/table.html" import list_table %}
|
||||
{% from "components/table.html" import list_table, field %}
|
||||
|
||||
{% block page_title %}
|
||||
Send text messages – GOV.UK Notify
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
<div class="grid-row">
|
||||
<div class="column-two-thirds">
|
||||
{{ sms_message(template.content) }}
|
||||
{{ sms_message(template.formatted_as_markup) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,13 +35,21 @@
|
||||
|
||||
{% if column_headers %}
|
||||
{% call(item) list_table(
|
||||
[],
|
||||
example_data,
|
||||
caption='Preview',
|
||||
field_headings=column_headers,
|
||||
field_headings_visible=True,
|
||||
caption_visible=False,
|
||||
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">
|
||||
|
||||
Reference in New Issue
Block a user