mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #3763 from alphagov/count-chars-sms-broadcast-templates
Add fragment or character counting when editing text message or broadcast templates
This commit is contained in:
@@ -11,10 +11,11 @@
|
||||
width='2-3',
|
||||
suffix=None,
|
||||
safe_error_message=False,
|
||||
rows=8
|
||||
rows=8,
|
||||
extra_form_group_classes=''
|
||||
) %}
|
||||
<div
|
||||
class="form-group{% if field.errors %} form-group-error{% endif %}"
|
||||
class="form-group{% if field.errors %} form-group-error{% endif %} {{ extra_form_group_classes }}"
|
||||
data-module="{% if autofocus %}autofocus{% elif colour_preview %}colour-preview{% endif %}"
|
||||
>
|
||||
<label class="form-label" for="{{ field.name }}">
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<span {% if error %}class="govuk-error-message"{% endif %}>
|
||||
{{ message }}
|
||||
</span>
|
||||
@@ -1,7 +1,7 @@
|
||||
{% 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/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% block service_page_title %}
|
||||
@@ -22,10 +22,22 @@
|
||||
"classes": "govuk-!-width-full",
|
||||
"hint": {"text": "Your recipients will not see this"},
|
||||
}) }}
|
||||
{{ 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-two-thirds">
|
||||
{{ textbox(form.template_content, highlight_placeholders=False, autosize=True, width='1-1', rows=5) }}
|
||||
{{ sticky_page_footer('Save') }}
|
||||
<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">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ page_footer('Save') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% 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/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% block service_page_title %}
|
||||
@@ -22,15 +22,24 @@
|
||||
"classes": "govuk-!-width-full",
|
||||
"hint": {"text": "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) }}
|
||||
{{ textbox(
|
||||
form.template_content,
|
||||
highlight_placeholders=True,
|
||||
width='1-1',
|
||||
rows=5,
|
||||
extra_form_group_classes='govuk-!-margin-bottom-2'
|
||||
) }}
|
||||
{% if current_user.platform_admin %}
|
||||
{{ form.process_type }}
|
||||
{% endif %}
|
||||
{{ sticky_page_footer(
|
||||
'Save'
|
||||
) }}
|
||||
</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='sms') }}" aria-live="polite">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ page_footer('Save') }}
|
||||
</div>
|
||||
<aside class="govuk-grid-column-full">
|
||||
{% include "partials/templates/guidance-personalisation.html" %}
|
||||
|
||||
Reference in New Issue
Block a user