mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 22:40:31 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into notify-445
This commit is contained in:
84
app/assets/images/product/01-templates-no-chrome.svg
Normal file
84
app/assets/images/product/01-templates-no-chrome.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 71 KiB |
85
app/assets/images/product/02-reporting-no-chrome.svg
Normal file
85
app/assets/images/product/02-reporting-no-chrome.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 62 KiB |
113
app/assets/images/product/03-spreadsheet-no-chrome.svg
Normal file
113
app/assets/images/product/03-spreadsheet-no-chrome.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 86 KiB |
22
app/assets/images/product/04-api-no-chrome.svg
Normal file
22
app/assets/images/product/04-api-no-chrome.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 26 KiB |
@@ -40,6 +40,8 @@ class Config(object):
|
||||
TEMPLATE_PREVIEW_API_HOST = getenv('TEMPLATE_PREVIEW_API_HOST', 'http://localhost:9999')
|
||||
TEMPLATE_PREVIEW_API_KEY = getenv('TEMPLATE_PREVIEW_API_KEY', 'my-secret-key')
|
||||
|
||||
GOVERNMENT_EMAIL_DOMAIN_NAMES = ['gov']
|
||||
|
||||
# Logging
|
||||
NOTIFY_LOG_LEVEL = getenv('NOTIFY_LOG_LEVEL', 'INFO')
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</p>
|
||||
{% if job.status == 'sending limits exceeded'%}
|
||||
<p class="govuk-error-message">
|
||||
Notify cannot send these messages because you have reached your daily limit. You can only send {{ current_service.message_limit|format_thousands }} messages per day.
|
||||
Notify cannot send these messages because you have reached a limit. You can only send {{ current_service.message_limit|format_thousands }} messages per day and {{ 250000|format_thousands }} messages in total.
|
||||
</p>
|
||||
<p class="govuk-error-message govuk-!-margin-bottom-6">
|
||||
Upload this spreadsheet again tomorrow or <a class="govuk-link" href="https://www.notifications.service.gov.uk/support">contact the U.S. Notify team</a> to raise the limit.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{% extends "content_template.html" %}
|
||||
{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %}
|
||||
{% from "components/sub-navigation.html" import sub_navigation %}
|
||||
{% from "components/service-link.html" import service_link %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Features
|
||||
@@ -26,7 +27,20 @@
|
||||
|
||||
<h2 class="heading-medium" id="personalised-messages">Personalized content</h2>
|
||||
<p class="govuk-body">Notify makes it easy to send personalized messages from a single template.</p>
|
||||
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.edit_and_format_messages', _anchor='personalised-content') }}">how to personalize your content</a>.</p>
|
||||
<p class="govuk-body">See <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.guidance_index', _anchor='personalized-content') }}">how to personalize your content</a>.</p>
|
||||
<h3 class="heading heading-small" id="sender">Show people who your texts are from</h3>
|
||||
<p class="govuk-body">When you send a text message with Notify, the sender name tells people who it’s from.</p>
|
||||
|
||||
<p class="govuk-body">To change the text message sender from the default of ‘U.S. Notify’:</p>
|
||||
|
||||
<ol class="list list-number">
|
||||
<li>Go to the <b class="govuk-!-font-weight-bold">Text message settings</b> section of the {{
|
||||
service_link(current_service, 'main.service_settings', 'settings') }} page.</li>
|
||||
<li>Select <b class="govuk-!-font-weight-bold">Manage</b> on the <b class="govuk-!-font-weight-bold">Text message
|
||||
senders</b> row.</li>
|
||||
<li>Select <b class="govuk-!-font-weight-bold">Change</b> or <b class="govuk-!-font-weight-bold">Add text message
|
||||
sender</b>.</li>
|
||||
</ol>
|
||||
|
||||
<h2 class="heading-medium" id="bulk-sending">Bulk sending</h2>
|
||||
<p class="govuk-body">To send a batch of messages at once, upload a list of contact details to Notify. You can also schedule the date and time you want them to be sent.</p>
|
||||
@@ -56,7 +70,7 @@
|
||||
|
||||
<!-- <p class="govuk-body">We send messages through several different providers. If one provider fails, Notify switches to another so that your messages are not affected.</p> -->
|
||||
|
||||
<p class="govuk-body">Visit our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.performance') }}">performance data</a> page to see how Notify is performing.</p>
|
||||
<!-- <p class="govuk-body">Visit our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.performance') }}">performance data</a> page to see how Notify is performing.</p> -->
|
||||
|
||||
<h2 class="heading-medium" id="security">Security</h2>
|
||||
<p class="govuk-body">Notify protects and manages data to meet the needs of government services.</p>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<ul class="list list-bullet">
|
||||
<li><a class="govuk-link govuk-link--no-visited-state" href="#formatting">format your content</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state" href="#links">add links</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state" href="#personalised-content">personalize your content</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state" href="#personalized-content">personalize your content</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state" href="#optional-content">add optional content</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<li>you can no longer control where the redirect goes</li>
|
||||
</ul>
|
||||
|
||||
<h2 class="heading-medium" id="personalised-content">Personalize your content</h2>
|
||||
<h2 class="heading-medium" id="personalized-content">Personalize your content</h2>
|
||||
|
||||
<p class="govuk-body">To personalize the content of your messages, add a placeholder to the template.</p>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
|
||||
<h2 class="govuk-heading-m">
|
||||
Messages sent since May 2016
|
||||
Messages sent since May 2023
|
||||
</h2>
|
||||
|
||||
<div class="govuk-grid-row">
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class="dashboard-table">
|
||||
{% call(item, row_number) list_table(
|
||||
notifications_by_type|reverse,
|
||||
caption='Messages sent since May 2016',
|
||||
caption='Messages sent since May 2023',
|
||||
caption_visible=False,
|
||||
field_headings=[
|
||||
'Date',
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
Control your content
|
||||
</h2>
|
||||
<p class="govuk-body">
|
||||
You do not need any technical knowledge to create message templates.
|
||||
You do not need any technical knowledge to create messages.
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img
|
||||
src="{{ asset_url('images/product/01-templates.svg') }}"
|
||||
src="{{ asset_url('images/product/01-templates-no-chrome.svg') }}"
|
||||
alt="Example screenshot of adding a new text message template">
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,7 +74,7 @@
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img
|
||||
src="{{ asset_url('images/product/02-reporting.svg') }}"
|
||||
src="{{ asset_url('images/product/02-reporting-no-chrome.svg') }}"
|
||||
alt="A screenshot of U.S. Notify showing counts of emails and text messages sent"
|
||||
>
|
||||
</div>
|
||||
@@ -90,7 +90,7 @@
|
||||
Upload a spreadsheet of phone numbers and Notify sends the messages.
|
||||
</p>
|
||||
<img
|
||||
src="{{ asset_url('images/product/03-spreadsheet.svg') }}"
|
||||
src="{{ asset_url('images/product/03-spreadsheet-no-chrome.svg') }}"
|
||||
alt="A screenshot of a spreadsheet with columns for email address, name and color"
|
||||
>
|
||||
</div>
|
||||
@@ -100,7 +100,7 @@
|
||||
back office system.
|
||||
</p>
|
||||
<img
|
||||
src="{{ asset_url('images/product/04-api.svg') }}"
|
||||
src="{{ asset_url('images/product/04-api-no-chrome.svg') }}"
|
||||
alt="A screenshot of some computer code with a notify.send_email function"
|
||||
>
|
||||
</div>
|
||||
@@ -122,10 +122,10 @@
|
||||
<span class="govuk-visually-hidden">using Notify.</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="govuk-body">
|
||||
<!-- <p class="govuk-body">
|
||||
See the
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.performance') }}">list of services and organizations</a>.
|
||||
</p>
|
||||
</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="product-page-section">
|
||||
@@ -154,7 +154,7 @@
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="product-page-section">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-row bottom-gutter-2">
|
||||
<div class="govuk-grid-column-full">
|
||||
<h2 class="with-keyline">
|
||||
The team
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
<p class="govuk-body"> U.S. Notify will:</p>
|
||||
<ul class="list list-bullet">
|
||||
<li>send all the messages you pass to us, as long as they meet our guidelines</li>
|
||||
<li>
|
||||
show how Notify is performing (through our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.performance') }}">performance</a> <!--and <a class="govuk-link govuk-link--no-visited-state" href="https://status.notifications.service.gov.uk/">status</a>-->page)
|
||||
</li>
|
||||
<!-- <li>
|
||||
show how Notify is performing (through our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.performance') }}">performance</a> and <a class="govuk-link govuk-link--no-visited-state" href="https://status.notifications.service.gov.uk/">status</a> page)
|
||||
</li> -->
|
||||
<li>keep your data <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.security') }}">secure</a></li>
|
||||
<li>give you one month’s notice by email if we change our terms of use or delivery providers</li>
|
||||
</ul>
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
gsa.gov
|
||||
gmail.com
|
||||
dispostable.com
|
||||
simulator.amazonses.com
|
||||
amazonses.com
|
||||
@@ -1,20 +1,14 @@
|
||||
import os
|
||||
from functools import wraps
|
||||
|
||||
from flask import abort, current_app
|
||||
from flask_login import current_user, login_required
|
||||
|
||||
from app import config
|
||||
from app.notify_client.organisations_api_client import organisations_client
|
||||
|
||||
user_is_logged_in = login_required
|
||||
|
||||
|
||||
with open('{}/email_domains.txt'.format(
|
||||
os.path.dirname(os.path.realpath(__file__))
|
||||
)) as email_domains:
|
||||
GOVERNMENT_EMAIL_DOMAIN_NAMES = [line.strip() for line in email_domains]
|
||||
|
||||
|
||||
def user_has_permissions(*permissions, **permission_kwargs):
|
||||
def wrap(func):
|
||||
@wraps(func)
|
||||
@@ -52,7 +46,7 @@ def user_is_platform_admin(f):
|
||||
|
||||
def is_gov_user(email_address):
|
||||
return _email_address_ends_with(
|
||||
email_address, GOVERNMENT_EMAIL_DOMAIN_NAMES
|
||||
email_address, config.Config.GOVERNMENT_EMAIL_DOMAIN_NAMES
|
||||
) or _email_address_ends_with(
|
||||
email_address, organisations_client.get_domains()
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user