mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
dynamically update title and page descriptions
This commit is contained in:
@@ -294,11 +294,23 @@
|
|||||||
if (this.currentState === 'add-new-template') {
|
if (this.currentState === 'add-new-template') {
|
||||||
this.$form.find('.template-list-item').addClass('js-hidden');
|
this.$form.find('.template-list-item').addClass('js-hidden');
|
||||||
$('.live-search').addClass('js-hidden');
|
$('.live-search').addClass('js-hidden');
|
||||||
|
$('#breadcrumb-template-folders').addClass('js-hidden');
|
||||||
|
$('#template-list').addClass('js-hidden');
|
||||||
this.$form.find('input[type=checkbox]').prop('checked', false);
|
this.$form.find('input[type=checkbox]').prop('checked', false);
|
||||||
this.selectionStatus.update({ total: 0, templates: 0, folders: 0 });
|
this.selectionStatus.update({ total: 0, templates: 0, folders: 0 });
|
||||||
|
|
||||||
|
$('#page-title').text('New Template');
|
||||||
|
$('#page-description').text('Every message starts with a template. Select to start with a blank template or copy an existing template.');
|
||||||
|
document.title = 'New Templates';
|
||||||
} else {
|
} else {
|
||||||
this.$form.find('.template-list-item').removeClass('js-hidden');
|
this.$form.find('.template-list-item').removeClass('js-hidden');
|
||||||
$('.live-search').removeClass('js-hidden');
|
$('.live-search').removeClass('js-hidden');
|
||||||
|
$('#breadcrumb-template-folders').removeClass('js-hidden');
|
||||||
|
$('#template-list').removeClass('js-hidden');
|
||||||
|
|
||||||
|
$('#page-title').text('Select or create a template');
|
||||||
|
$('#page-description').text('Every message starts with a template. To send, choose or create a template.');
|
||||||
|
document.title = 'Select or create a template';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentStateObj && 'setFocus' in currentStateObj) {
|
if (currentStateObj && 'setFocus' in currentStateObj) {
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
<div class="grid-row flex-column">
|
<div class="grid-row flex-column">
|
||||||
<h1 class="font-body-2xl line-height-sans-2 margin-bottom-1 margin-top-0">{{page_title}}</h1>
|
<h1 class="font-body-2xl line-height-sans-2 margin-bottom-1 margin-top-0" id="page-title">{{page_title}}</h1>
|
||||||
<div class="{% if current_user.has_permissions('manage_templates') %} grid-col-10 {% else %} grid-col-12 {% endif %}">
|
<div class="{% if current_user.has_permissions('manage_templates') %} grid-col-10 {% else %} grid-col-12 {% endif %}">
|
||||||
<p class="margin-top-0 margin-bottom-4">
|
<p class="margin-top-0 margin-bottom-4" id="page-description">
|
||||||
Every message starts with a template. To send, choose or create a template.
|
Every message starts with a template. To send, choose or create a template.
|
||||||
</p>
|
</p>
|
||||||
{{ folder_path(
|
{{ folder_path(
|
||||||
|
|||||||
Reference in New Issue
Block a user