mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
revising message preview
This commit is contained in:
@@ -637,11 +637,6 @@ def start_job(service_id, upload_id):
|
|||||||
"/services/<uuid:service_id>/<uuid:template_id>/check/<uuid:upload_id>/preview",
|
"/services/<uuid:service_id>/<uuid:template_id>/check/<uuid:upload_id>/preview",
|
||||||
methods=["POST"],
|
methods=["POST"],
|
||||||
)
|
)
|
||||||
@main.route(
|
|
||||||
"/services/<uuid:service_id>/<uuid:template_id>/check/<uuid:upload_id>/row-<int:row_index>/preview",
|
|
||||||
methods=["POST"],
|
|
||||||
)
|
|
||||||
@main.route("/services/<uuid:service_id>/preview-job/<uuid:upload_id>", methods=["POST"])
|
|
||||||
@user_has_permissions("send_messages", restrict_admin_usage=True)
|
@user_has_permissions("send_messages", restrict_admin_usage=True)
|
||||||
def preview_job(service_id, template_id, upload_id, row_index=2):
|
def preview_job(service_id, template_id, upload_id, row_index=2):
|
||||||
# Store form data in session temporarily
|
# Store form data in session temporarily
|
||||||
@@ -678,7 +673,7 @@ def preview_job(service_id, template_id, upload_id, row_index=2):
|
|||||||
|
|
||||||
set_metadata_on_csv_upload(service_id, upload_id, **metadata_kwargs)
|
set_metadata_on_csv_upload(service_id, upload_id, **metadata_kwargs)
|
||||||
|
|
||||||
return render_template('views/check/preview.html', data=session['scheduled_for'], **data)
|
return render_template('views/check/preview.html', data=session['scheduled_for'], **data, metadata_kwargs=metadata_kwargs)
|
||||||
|
|
||||||
|
|
||||||
def fields_to_fill_in(template, prefill_current_user=False):
|
def fields_to_fill_in(template, prefill_current_user=False):
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
|
|
||||||
{{ page_header('Send messages') }}
|
{{ page_header('Send messages') }}
|
||||||
<h2 id="{{ file_contents_header_id }}">Message</h2>
|
<h2 id="{{ file_contents_header_id }}">Message</h2>
|
||||||
|
{% if data %}
|
||||||
|
<p>Time: {{data | format_datetime_short_america}}</p>
|
||||||
|
{% endif %}
|
||||||
|
<p class="sms-message-sender">File: {{metadata_kwargs.original_file_name}}</p>
|
||||||
{{ template|string }}
|
{{ template|string }}
|
||||||
<div class="bottom-gutter-3-2">
|
<div class="bottom-gutter-3-2">
|
||||||
<form method="post" enctype="multipart/form-data" action="{{url_for('main.start_job', service_id=current_service.id, upload_id=upload_id)}}" class='page-footer'>
|
<form method="post" enctype="multipart/form-data" action="{{url_for('main.start_job', service_id=current_service.id, upload_id=upload_id)}}" class='page-footer'>
|
||||||
|
|||||||
Reference in New Issue
Block a user