mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-27 22:00:59 -05:00
Includes: - turning off :visited styles to match existing design - swapping heading classes used to make links bold for the GOVUK Frontend bold override class - adding visually hidden text to some links to make them work when isolated from their context We may need to revisit whether some links, such as those for documentation and features, may benefit from having some indication that their target has been visited.
90 lines
3.4 KiB
HTML
90 lines
3.4 KiB
HTML
{% extends "withnav_template.html" %}
|
||
{% from "components/banner.html" import banner_wrapper %}
|
||
{% from "components/message-count-label.html" import message_count_label %}
|
||
{% from "components/page-header.html" import page_header %}
|
||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||
{% from "components/button/macro.njk" import govukButton %}
|
||
|
||
{% block service_page_title %}
|
||
{{ "Error" if error else "Preview of ‘{}’".format(template.name) }}
|
||
{% endblock %}
|
||
|
||
{% block maincolumn_content %}
|
||
{% if template.template_type == 'letter' and current_service.trial_mode %}
|
||
{{ govukBackLink({ "href": back_link }) }}
|
||
{% set error = 'trial-mode-letters' %}
|
||
<div class="bottom-gutter">
|
||
{% call banner_wrapper(type='dangerous') %}
|
||
{% with
|
||
count_of_recipients=1
|
||
%}
|
||
{% include "partials/check/trying-to-send-letters-in-trial-mode.html" %}
|
||
{% endwith %}
|
||
{% endcall %}
|
||
</div>
|
||
{% elif error == 'not-allowed-to-send-to' %}
|
||
{{ govukBackLink({ "href": back_link }) }}
|
||
<div class="bottom-gutter">
|
||
{% call banner_wrapper(type='dangerous') %}
|
||
{% with
|
||
count_of_recipients=1,
|
||
template_type_label=(
|
||
'phone number' if template.template_type == 'sms' else 'email address'
|
||
)
|
||
%}
|
||
{% include "partials/check/not-allowed-to-send-to.html" %}
|
||
{% endwith %}
|
||
{% endcall %}
|
||
</div>
|
||
{% elif error == 'too-many-messages' %}
|
||
{{ govukBackLink({ "href": back_link }) }}
|
||
<div class="bottom-gutter">
|
||
{% call banner_wrapper(type='dangerous') %}
|
||
{% include "partials/check/too-many-messages.html" %}
|
||
{% endcall %}
|
||
</div>
|
||
{% elif error == 'message-too-long' %}
|
||
{# the only row_errors we can get when sending one off messages is that the message is too long #}
|
||
{{ govukBackLink({ "href": back_link }) }}
|
||
<div class="bottom-gutter">
|
||
{% call banner_wrapper(type='dangerous') %}
|
||
{% include "partials/check/message-too-long.html" %}
|
||
{% endcall %}
|
||
</div>
|
||
{% elif letter_too_long %}
|
||
{% set error = 'letter-too-long' %}
|
||
{{ govukBackLink({ "href": back_link }) }}
|
||
<div class="bottom-gutter">
|
||
{% call banner_wrapper(type='dangerous') %}
|
||
{% include "partials/check/letter-too-long.html" %}
|
||
{% endcall %}
|
||
</div>
|
||
{% else %}
|
||
{{ page_header(
|
||
'Preview of ‘{}’'.format(template.name),
|
||
back_link=back_link
|
||
) }}
|
||
{% endif %}
|
||
|
||
{{ template|string }}
|
||
|
||
<div class="js-stick-at-bottom-when-scrolling">
|
||
<form method="post" enctype="multipart/form-data" action="{{url_for(
|
||
'main.send_notification',
|
||
service_id=current_service.id,
|
||
template_id=template.id,
|
||
help='3' if help else 0
|
||
)}}" class='page-footer'>
|
||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
||
{% if not error %}
|
||
{% set button_text %}Send 1 {{ message_count_label(1, template.template_type, suffix='') }}{% endset %}
|
||
{{ govukButton({ "text": button_text }) }}
|
||
{% endif %}
|
||
{% if template.template_type == 'letter' %}
|
||
<a href="{{ url_for('no_cookie.check_notification_preview', service_id=current_service.id, template_id=template.id, filetype='pdf') }}" download class="govuk-link govuk-link--no-visited-state page-footer-right-aligned-link{% if error %}-without-button{% endif %}">Download as a PDF</a>
|
||
{% endif %}
|
||
</form>
|
||
</div>
|
||
|
||
{% endblock %}
|