mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-17 04:59:37 -04:00
Update utils with to make letters unclickable
Brings in: - [ ] https://github.com/alphagov/notifications-utils/pull/159 Means: - renaming a bunch of things - removing any CSS that targeted the link, and making it target the containing element too
This commit is contained in:
@@ -87,7 +87,12 @@ def send_messages(service_id, template_id):
|
||||
service_api_client.get_service_template(service_id, template_id)['data'],
|
||||
current_service,
|
||||
show_recipient=True,
|
||||
letter_preview_url=url_for('.view_template', service_id=service_id, template_id=template_id),
|
||||
letter_preview_url=url_for(
|
||||
'.view_letter_template_preview',
|
||||
service_id=service_id,
|
||||
template_id=template_id,
|
||||
filetype='png',
|
||||
),
|
||||
)
|
||||
|
||||
form = CsvUploadForm()
|
||||
@@ -149,7 +154,12 @@ def send_test(service_id, template_id):
|
||||
service_api_client.get_service_template(service_id, template_id)['data'],
|
||||
current_service,
|
||||
show_recipient=True,
|
||||
letter_preview_url=url_for('.view_template', service_id=service_id, template_id=template_id),
|
||||
letter_preview_url=url_for(
|
||||
'.view_letter_template_preview',
|
||||
service_id=service_id,
|
||||
template_id=template_id,
|
||||
filetype='png',
|
||||
),
|
||||
)
|
||||
|
||||
if len(template.placeholders) == 0 or request.method == 'POST':
|
||||
@@ -212,10 +222,11 @@ def _check_messages(service_id, template_type, upload_id, letters_as_pdf=False):
|
||||
current_service,
|
||||
show_recipient=True,
|
||||
letter_preview_url=url_for(
|
||||
'.check_messages',
|
||||
'.check_messages_preview',
|
||||
service_id=service_id,
|
||||
template_type=template_type,
|
||||
upload_id=upload_id
|
||||
upload_id=upload_id,
|
||||
filetype='png',
|
||||
) if not letters_as_pdf else None
|
||||
)
|
||||
recipients = RecipientCSV(
|
||||
|
||||
@@ -84,7 +84,12 @@ def view_template(service_id, template_id):
|
||||
template,
|
||||
current_service,
|
||||
expand_emails=True,
|
||||
letter_preview_url=url_for('.view_template', service_id=service_id, template_id=template_id),
|
||||
letter_preview_url=url_for(
|
||||
'.view_letter_template_preview',
|
||||
service_id=service_id,
|
||||
template_id=template_id,
|
||||
filetype='png',
|
||||
),
|
||||
show_recipient=True,
|
||||
page_count=page_count,
|
||||
),
|
||||
@@ -108,10 +113,11 @@ def _view_template_version(service_id, template_id, version, letters_as_pdf=Fals
|
||||
current_service,
|
||||
expand_emails=True,
|
||||
letter_preview_url=url_for(
|
||||
'.view_template_version',
|
||||
'.view_template_version_preview',
|
||||
service_id=service_id,
|
||||
template_id=template_id,
|
||||
version=version,
|
||||
filetype='png',
|
||||
) if not letters_as_pdf else None
|
||||
))
|
||||
|
||||
@@ -344,7 +350,12 @@ def delete_service_template(service_id, template_id):
|
||||
template,
|
||||
current_service,
|
||||
expand_emails=True,
|
||||
letter_preview_url=url_for('.view_template', service_id=service_id, template_id=template['id']),
|
||||
letter_preview_url=url_for(
|
||||
'.view_letter_template_preview',
|
||||
service_id=service_id,
|
||||
template_id=template['id'],
|
||||
filetype='png',
|
||||
),
|
||||
show_recipient=True,
|
||||
)
|
||||
)
|
||||
@@ -370,10 +381,11 @@ def view_template_versions(service_id, template_id):
|
||||
current_service,
|
||||
expand_emails=True,
|
||||
letter_preview_url=url_for(
|
||||
'.view_template_version',
|
||||
'.view_template_version_preview',
|
||||
service_id=service_id,
|
||||
template_id=template_id,
|
||||
version=template['version'],
|
||||
filetype='png',
|
||||
)
|
||||
)
|
||||
for template in service_api_client.get_service_template_versions(service_id, template_id)['data']
|
||||
|
||||
Reference in New Issue
Block a user