mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 18:22:37 -04:00
Merge pull request #3498 from alphagov/add-broadcast-template
Allow adding broadcast templates
This commit is contained in:
@@ -24,6 +24,12 @@
|
||||
{%- else -%}
|
||||
letters
|
||||
{%- endif -%}
|
||||
{%- elif template_type == 'broadcast' -%}
|
||||
{%- if count == 1 -%}
|
||||
broadcast
|
||||
{%- else -%}
|
||||
broadcasts
|
||||
{%- endif -%}
|
||||
{%- endif %} {{ suffix }}
|
||||
{%- endmacro %}
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import sticky_page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ heading_action }} broadcast template
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(
|
||||
'{} broadcast template'.format(heading_action),
|
||||
back_link=url_for('main.view_template', service_id=current_service.id, template_id=template.id) if template else url_for('main.choose_template', service_id=current_service.id, template_folder_id=template_folder_id)
|
||||
) }}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
{{ textbox(form.name, width='1-1', hint='Your recipients will not see this') }}
|
||||
</div>
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
{{ textbox(form.template_content, highlight_placeholders=True, width='1-1', rows=5) }}
|
||||
{{ sticky_page_footer('Save') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -28,6 +28,14 @@
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% elif template.template_type == 'broadcast' %}
|
||||
{% if current_user.has_permissions('manage_templates') %}
|
||||
<div class="govuk-grid-column-full">
|
||||
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
||||
Edit
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
|
||||
<div class="govuk-grid-column-one-half">
|
||||
|
||||
Reference in New Issue
Block a user