mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
For users who: - want to send messages from a template - want to edit templates For developers: - who need to get the ID of a template This commit mainly cleans up the choose template page so there are less options, and the options that are there are less wordy. This means: - moving ‘send yourself a test’ onto the send messages page, and making it button - stripping a lot of stuff out of the ‘send from API’ page, so it’s more obvious what the template ID is
30 lines
1.3 KiB
HTML
30 lines
1.3 KiB
HTML
{% from "components/email-message.html" import email_message %}
|
|
{% from "components/sms-message.html" import sms_message %}
|
|
|
|
<div class="column-two-thirds">
|
|
{% if 'email' == template.template_type %}
|
|
{{ email_message(
|
|
template.formatted_subject_as_markup,
|
|
template.formatted_as_markup,
|
|
name=template.name if show_title else None
|
|
) }}
|
|
{% elif 'sms' == template.template_type %}
|
|
{{ sms_message(
|
|
template.formatted_as_markup,
|
|
name=template.name if show_title else None
|
|
) }}
|
|
{% endif %}
|
|
</div>
|
|
<div class="column-one-third">
|
|
<div class="sms-message-use-links{% if show_title %}-with-title{% endif %}">
|
|
{% if current_user.has_permissions(permissions=['send_texts', 'send_emails', 'send_letters']) %}
|
|
<a href="{{ url_for(".send_messages", service_id=current_service.id, template_id=template.id) }}">
|
|
Send {{ 'text messages' if 'sms' == template.template_type else 'emails' }}
|
|
</a>
|
|
{% endif %}
|
|
{% if current_user.has_permissions(permissions=['manage_templates'], admin_override=True) %}
|
|
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}">Edit template</a>
|
|
{% endif %}
|
|
<a href="{{ url_for(".send_from_api", service_id=current_service.id, template_id=template.id) }}">API info</a>
|
|
</div>
|
|
</div> |