mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Merge pull request #2663 from GSA/2253-bug-on-template-page
Fixes for several bugs on the templates page related to form submission issues
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
<nav id="template-list" aria-label="Choose reply">
|
||||
<ul>
|
||||
{% for item in templates_and_folders %}
|
||||
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
||||
<li class="template-list-item {% if item.ancestors %}template-list-item-hidden-by-default{% else %}template-list-item-without-ancestors{% endif %}">
|
||||
{% for ancestor in item.ancestors %}
|
||||
<a href="{{ url_for('.conversation_reply', service_id=current_service.id, notification_id=notification_id, from_folder=ancestor.id) }}" class="usa-link template-list-folder">
|
||||
{{ ancestor.name }}
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
{% else %}
|
||||
|
||||
<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 %}">
|
||||
<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.
|
||||
</p>
|
||||
{{ folder_path(
|
||||
@@ -59,6 +59,10 @@
|
||||
|
||||
{{ live_search(target_selector='#template-list .template-list-item', show=show_search_box, form=search_form) }}
|
||||
|
||||
<div class="js-live-search-no-results" style="display: none;">
|
||||
<p class="usa-body margin-top-2">No templates found</p>
|
||||
</div>
|
||||
|
||||
{% if current_user.has_permissions('manage_templates') and user_has_template_folder_permission %}
|
||||
{% call form_wrapper(
|
||||
class='sticky-scroll-area',
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
{% from "components/folder-path.html" import copy_folder_path, page_title_folder_path %}
|
||||
{% from "components/live-search.html" import live_search %}
|
||||
{% from "components/components/back-link/macro.njk" import usaBackLink %}
|
||||
|
||||
{% extends "withnav_template.html" %}
|
||||
{% set page_title = "Copy an existing template" %}
|
||||
@@ -8,6 +9,12 @@
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{% if not from_service %}
|
||||
{{ usaBackLink({ "href": url_for('.choose_template', service_id=current_service.id),
|
||||
"html": "Back to all templates" }) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="">
|
||||
@@ -25,11 +32,14 @@
|
||||
form=search_form,
|
||||
autofocus=True
|
||||
) }}
|
||||
<div class="js-live-search-no-results" style="display: none;">
|
||||
<p class="usa-body margin-top-2">No templates found</p>
|
||||
</div>
|
||||
<nav id="template-list" aria-label="Copy template list">
|
||||
<ul>
|
||||
{% for item in services_templates_and_folders %}
|
||||
|
||||
<li class="template-list-item margin-bottom-2 {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
||||
<li class="template-list-item margin-bottom-2">
|
||||
{% if item.is_service %}
|
||||
{% elif item.is_folder %}
|
||||
{% else %}
|
||||
|
||||
Reference in New Issue
Block a user