Files
notifications-admin/app/templates/views/broadcast/write-new-broadcast.html
Chris Hill-Scott 99b7d8a66f Add flow for composing an alert without a template
We think that in some cases alerts will be composed in the moment, and
therefore making people first create a template is:
- not a good use of their time
- adding some conceptual complexity which they don’t need

This commit makes it possible to type some words and have them go
straight into the `content` field in the database.

In the future we might want to progressively enhance the radio buttons
so they show on the same page (like we do with the grey buttons on the
templates page).
2021-01-18 17:09:01 +00:00

50 lines
1.5 KiB
HTML

{% from "components/form.html" import form_wrapper %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/textbox.html" import textbox %}
{% extends "withnav_template.html" %}
{% block service_page_title %}
New alert
{% endblock %}
{% block maincolumn_content %}
{{ page_header(
'New alert',
back_link=url_for('.new_broadcast', service_id=current_service.id),
)}}
{% call form_wrapper() %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
{{ form.name(param_extensions={
"classes": "govuk-!-width-full",
"hint": {"text": "Your recipients will not see this"},
"label": {"text": "Title"}
}) }}
</div>
<div class="govuk-grid-column-two-thirds">
{{ textbox(
form.template_content,
highlight_placeholders=False,
autosize=True,
width='1-1',
rows=5,
extra_form_group_classes='govuk-!-margin-bottom-2'
) }}
</div>
<div class="govuk-grid-column-full">
<div class="template-content-count">
<div data-module="update-status" data-target="template_content" data-updates-url="{{ url_for('.count_content_length', service_id=current_service.id, template_type='broadcast') }}" aria-live="polite">
&nbsp;
</div>
</div>
{{ page_footer('Continue') }}
</div>
</div>
{% endcall %}
{% endblock %}