mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Make example on send look more like a spreadsheet
Now that the example on the breaking changes page looks more like a spreadsheet, we should do the same thing for the downloadable example on the send page.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import json
|
||||
import itertools
|
||||
from string import ascii_uppercase
|
||||
|
||||
from contextlib import suppress
|
||||
from zipfile import BadZipFile
|
||||
from xlrd.biffh import XLRDError
|
||||
@@ -127,8 +129,11 @@ def send_messages(service_id, template_id):
|
||||
return render_template(
|
||||
'views/send.html',
|
||||
template=template,
|
||||
recipient_column=first_column_heading[template.template_type],
|
||||
example=[get_example_csv_rows(template)],
|
||||
column_headings=list(ascii_uppercase[:len(template.placeholders) + 1]),
|
||||
example=[
|
||||
[first_column_heading[template.template_type]] + list(template.placeholders),
|
||||
get_example_csv_rows(template)
|
||||
],
|
||||
form=form
|
||||
)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import string
|
||||
from string import ascii_uppercase
|
||||
|
||||
from flask import request, render_template, redirect, url_for, flash, abort, session
|
||||
from flask_login import login_required
|
||||
@@ -127,7 +127,7 @@ def edit_service_template(service_id, template_id):
|
||||
'views/templates/breaking-change.html',
|
||||
template_change=template_change,
|
||||
new_template=new_template,
|
||||
column_headings=list(string.ascii_uppercase[:len(new_template.placeholders) + 1]),
|
||||
column_headings=list(ascii_uppercase[:len(new_template.placeholders) + 1]),
|
||||
example_rows=[
|
||||
[first_column_heading[new_template.template_type]] + list(new_template.placeholders),
|
||||
get_example_csv_rows(new_template),
|
||||
|
||||
Reference in New Issue
Block a user