mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-06-02 20:40:51 -04:00
* 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
117 lines
4.3 KiB
HTML
117 lines
4.3 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/banner.html" import banner_wrapper %}
|
|
{% from "components/table.html" import list_table, field, text_field, hidden_field_heading %}
|
|
{% 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) }}
|
|
{% 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>
|
|
|
|
<h2 id="{{ file_contents_header_id }}">Message</h2>
|
|
<div class="preview-message"> {{ template|string }}</div>
|
|
{% if not request.args.from_test %}
|
|
<h2>Recipients list</h2>
|
|
<div>
|
|
<ul class="usa-icon-list">
|
|
<li class="usa-icon-list__item">
|
|
<img src="{{ url_for('static', filename='img/material-icons/description.svg') }}" alt="">
|
|
<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">
|
|
<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>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
<!-- <div class="margin-bottom-3">
|
|
<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>
|
|
</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",
|
|
"href": url_for('main.send_messages', service_id=current_service.id, template_id=template_id)
|
|
}) }}
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|