mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Merge pull request #213 from alphagov/accept-phone-or-email-column
Accept CSVs with 'email address' or 'phone number'
This commit is contained in:
@@ -61,13 +61,17 @@
|
||||
caption=original_file_name,
|
||||
field_headings=column_headers
|
||||
) %}
|
||||
{% if item.to or ''|valid_phone_number %}
|
||||
{% if item.get('phone number', '')|valid_phone_number %}
|
||||
{% call field() %}
|
||||
{{ item.to }}
|
||||
{{ item['phone number'] }}
|
||||
{% endcall %}
|
||||
{% elif item.get('email address') %}
|
||||
{% call field() %}
|
||||
{{ item['email address'] }}
|
||||
{% endcall %}
|
||||
{% else %}
|
||||
{% call field(status='missing') %}
|
||||
{{ item.to }}
|
||||
{{ item['phone number'] }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
{% for column in template.placeholders %}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="bottom-gutter-2-3">
|
||||
<span class='placeholder'>to</span>
|
||||
<span class='placeholder'>{{ recipient_column }}</span>
|
||||
{{ template.placeholders_as_markup|join(" ") }}
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user