Files
notifications-admin/app/templates/views/check/preview.html

117 lines
4.3 KiB
HTML
Raw Normal View History

2024-02-02 14:52:48 -08:00
{% extends "withnav_template.html" %}
{% from "components/banner.html" import banner_wrapper %}
2024-02-08 18:43:17 -08:00
{% from "components/table.html" import list_table, field, text_field, hidden_field_heading %}
2024-02-02 14:52:48 -08:00
{% from "components/page-header.html" import page_header %}
{% from "components/components/button/macro.njk" import usaButton %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% set file_contents_header_id = 'file-preview' %}
{% block service_page_title %}
{{ "Preview of {}".format(template.name) }}
{% endblock %}
{% block backLink %}
{{ usaBackLink(back_link_from_preview) }}
2024-02-02 14:52:48 -08:00
{% endblock %}
{% block maincolumn_content %}
{{ page_header('Preview') }}
<div>
<p class="sms-message-scheduler">Scheduled: {{ scheduled_for |format_datetime_scheduled_notification if scheduled_for else 'Now'}}</p>
<p class="sms-message-file-name">File: {{original_file_name}}</p>
<p class="sms-message-template">Template: {{template.name}}</p>
<p class="sms-message-sender" >From: {{ template.sender }}</p>
</div>
2024-02-02 14:52:48 -08:00
<h2 id="{{ file_contents_header_id }}">Message</h2>
2024-04-01 18:03:38 -07:00
<div class="preview-message"> {{ template|string }}</div>
2024-02-16 17:19:03 -08:00
{% if not request.args.from_test %}
<h2>Recipients list</h2>
<div>
<ul class="usa-icon-list">
<li class="usa-icon-list__item">
2024-12-11 10:30:16 -05:00
<img src="{{ url_for('static', filename='img/material-icons/description.svg') }}" alt="">
2024-02-16 17:19:03 -08:00
<div class="usa-icon-list__content">
<h3>{{ original_file_name }}</h3>
</div>
</li>
</ul>
</div>
<div class="usa-table-container--scrollable table-overflow-x-auto" tabindex="0">
2024-03-12 13:41:05 -07:00
<table class="usa-table usa-table--borderless width-full">
<caption class="font-body-lg table-heading">
Note: Only the first 5 rows are displayed here.
</caption>
<thead class="table-field-headings-visible">
<tr>
{% for header in recipients.column_headers %}
<th scope="col" class="table-field-heading-first">
{{ header }}
</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for item in recipients.displayed_rows %}
{% if loop.index <= 5 %}
<tr class="table-row">
{% for column in recipients.column_headers %}
<td class="table-field-left-aligned">
<div>
{% set column_data = item[column].data or '' %}
{% if column_data is iterable and column_data is not string %}
<ul>
{% for data_item in column_data %}
{% if data_item is not none %}
<li>{{ data_item }}</li>
{% endif %}
{% endfor %}
</ul>
{% else %}
{{ column_data }}
{% endif %}
</div>
</td>
{% endfor %}
{% if item[None].data %}
{% for column in item[None].data %}
<td class="table-field-left-aligned">
<div class="">
{{ column }}
</div>
</td>
{% endfor %}
{% endif %}
</tr>
2024-03-12 13:41:05 -07:00
{% endif %}
{% endfor %}
</tbody>
</table>
2024-02-02 14:52:48 -08:00
</div>
2024-02-16 17:19:03 -08:00
{% endif %}
Removed all govuk css (#2814) * Removed all govuk css * Updated reference files * Removing govuk js * Fixed casing for modules, removed unused page * Got more reference images * Updated template page * Removed govuk padding util * Updated hint to uswds hint * More govuk cleanup * Commiting backstopjs ref files * Fixed all unit tests that broke due to brittleness around govuk styling * Added new ref images * Final removal of govuk * Officially removed all govuk references * Updated reference file * Updated link to button * UI modernization * Cleanup * removed govuk escaping tests since they are no longer needed * Fix CodeQL security issue in escapeElementName function - Escape backslashes first before other special characters - Prevents potential double-escaping vulnerability - Addresses CodeQL alert about improper string escaping * Found more govuk removal. Fixed unit tests * Add missing pipeline check to pre-commit * updated test * Updated e2e test * More update to e2e test * Fixed another e2e test * Simple PR comments addressed * More updates * Updated backstop ref files * Refactored folder selection for non-admins * Updated redundant line * Updated tests to include correct mocks * Added more ref files * Addressing carlos comments * Addressing Carlo comments, cleanup of window initing * More cleanup and addressing carlo comments * Fixing a11 scan * Fixed a few issues with javascript * Fixed for pr * Fixing e2e tests * Tweaking e2e test * Added more ref files and cleaned up urls.js * Fixed bug with creating new template * Removed brittle test - addressed code ql comment * e2e race condition fix * More e2e test fixes * Updated e2e tests to not wait for text sent * Updated test to not wait for button click response * Made tear down more resilent if staging is down * reverted e2e test to what was working before main merge * Updated backstopRef images * Updated gulp to include job-polling differently
2025-10-06 09:38:54 -04:00
<!-- <div class="margin-bottom-3">
2024-03-08 10:32:29 -08:00
<p>This is a placeholder: This message will be delivered to <b>400 phone numbers</b> and will use a total of <b>800 message parts</b>, leaving Washington DSHS with <b>249,200 message parts remaining</b>.</p>
2024-02-16 17:19:03 -08:00
</div> -->
<form method="post" enctype="multipart/form-data" action="{{url_for('main.start_job', service_id=current_service.id, upload_id=upload_id)}}" class='page-footer'>
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
<h3>Does everything look good?</h3>
{% set button_text %}
{{ "Schedule" if scheduled_for else 'Send'}}
{% endset %}
<div>
{{ usaButton({
"text": button_text,
"name": button_text
}) }}
{{ usaButton({
"text": "Change CSV file",
"classes": "usa-button--outline",
2025-09-04 15:03:52 -07:00
"href": url_for('main.send_messages', service_id=current_service.id, template_id=template_id)
}) }}
</div>
2024-02-16 17:19:03 -08:00
</form>
2024-02-02 14:52:48 -08:00
{% endblock %}