mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
added choose time form
This commit is contained in:
@@ -780,6 +780,8 @@ def _check_notification(service_id, template_id, exception=None):
|
|||||||
|
|
||||||
back_link = get_back_link(service_id, template, len(placeholders), placeholders)
|
back_link = get_back_link(service_id, template, len(placeholders), placeholders)
|
||||||
|
|
||||||
|
choose_time_form = ChooseTimeForm()
|
||||||
|
|
||||||
if (not session.get("recipient")) or not all_placeholders_in_session(
|
if (not session.get("recipient")) or not all_placeholders_in_session(
|
||||||
template.placeholders
|
template.placeholders
|
||||||
):
|
):
|
||||||
@@ -791,6 +793,7 @@ def _check_notification(service_id, template_id, exception=None):
|
|||||||
return dict(
|
return dict(
|
||||||
template=template,
|
template=template,
|
||||||
back_link=back_link,
|
back_link=back_link,
|
||||||
|
choose_time_form=choose_time_form,
|
||||||
**(get_template_error_dict(exception) if exception else {}),
|
**(get_template_error_dict(exception) if exception else {}),
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -861,7 +864,7 @@ def send_notification(service_id, template_id):
|
|||||||
job_api_client.create_job(
|
job_api_client.create_job(
|
||||||
upload_id,
|
upload_id,
|
||||||
service_id,
|
service_id,
|
||||||
scheduled_for="",
|
scheduled_for=request.form.get("scheduled_for", ""),
|
||||||
template_id=template_id,
|
template_id=template_id,
|
||||||
original_file_name=filename,
|
original_file_name=filename,
|
||||||
notification_count=1,
|
notification_count=1,
|
||||||
|
|||||||
@@ -54,6 +54,16 @@
|
|||||||
)}}" class='page-footer'>
|
)}}" class='page-footer'>
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||||||
{% if not error %}
|
{% if not error %}
|
||||||
|
{% if choose_time_form %}
|
||||||
|
{{ choose_time_form.scheduled_for(param_extensions={
|
||||||
|
'formGroup': {'classes': 'bottom-gutter-2-3'},
|
||||||
|
'attributes': {
|
||||||
|
'data-module': 'radio-select',
|
||||||
|
'data-categories': choose_time_form.scheduled_for.categories|join(','),
|
||||||
|
'data-show-now-as-default': 'true'
|
||||||
|
}
|
||||||
|
}) }}
|
||||||
|
{% endif %}
|
||||||
{% set button_text %}Send 1 {{ 1|message_count_label(template.template_type, suffix='') }}{% endset %}
|
{% set button_text %}Send 1 {{ 1|message_count_label(template.template_type, suffix='') }}{% endset %}
|
||||||
{{ usaButton({ "text": button_text }) }}
|
{{ usaButton({ "text": button_text }) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user