mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-03 13:18:57 -04:00
Merge branch 'main' into 2199-add-pending-message-data-to-daily-and-user_daily-stats
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
width: 100%;
|
||||
max-width: 464px;
|
||||
box-sizing: border-box;
|
||||
padding: units(1);
|
||||
padding: units(2);
|
||||
background: color('gray-cool-10');
|
||||
border: 1px solid color('gray-cool-10');
|
||||
border-radius: 5px;
|
||||
|
||||
@@ -1024,3 +1024,7 @@ nav.nav {
|
||||
font-size: units(3);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.form-control-error {
|
||||
border: 4px solid #b10e1e
|
||||
}
|
||||
|
||||
@@ -300,6 +300,13 @@ def studio():
|
||||
)
|
||||
|
||||
|
||||
@main.route("/acceptable-use-policy")
|
||||
def acceptable_use_policy():
|
||||
return render_template(
|
||||
"views/acceptable-use-policy.html",
|
||||
)
|
||||
|
||||
|
||||
# --- Redirects --- #
|
||||
|
||||
|
||||
|
||||
@@ -645,6 +645,7 @@ def edit_service_template(service_id, template_id):
|
||||
return render_template(
|
||||
"views/edit-{}-template.html".format(template["template_type"]),
|
||||
form=form,
|
||||
errors=form.errors if form.errors else None,
|
||||
template=template,
|
||||
heading_action="Edit",
|
||||
)
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
import json
|
||||
|
||||
from app.extensions import redis_client
|
||||
from app.notify_client import NotifyAdminAPIClient
|
||||
|
||||
|
||||
@@ -15,10 +18,19 @@ class BillingAPIClient(NotifyAdminAPIClient):
|
||||
)
|
||||
|
||||
def get_free_sms_fragment_limit_for_year(self, service_id, year=None):
|
||||
frag_limit = redis_client.get(f"free-sms-fragment-limit-{service_id}-{year}")
|
||||
if frag_limit is not None:
|
||||
return json.loads(frag_limit.decode("utf-8"))
|
||||
result = self.get(
|
||||
"/service/{0}/billing/free-sms-fragment-limit".format(service_id),
|
||||
params=dict(financial_year_start=year),
|
||||
)
|
||||
|
||||
redis_client.set(
|
||||
f"free-sms-fragment-limit-{service_id}-{year}",
|
||||
json.dumps(result["free_sms_fragment_limit"]),
|
||||
ex=30,
|
||||
)
|
||||
return result["free_sms_fragment_limit"]
|
||||
|
||||
def create_or_update_free_sms_fragment_limit(
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import json
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from app.extensions import redis_client
|
||||
@@ -517,7 +518,18 @@ class ServiceAPIClient(NotifyAdminAPIClient):
|
||||
return int(count)
|
||||
|
||||
def get_global_notification_count(self, service_id):
|
||||
return self.get("/service/{}/notification-count".format(service_id))
|
||||
notification_count = redis_client.get(f"notification-count-{service_id}")
|
||||
if notification_count is not None:
|
||||
return json.loads(notification_count.decode("utf-8"))
|
||||
|
||||
notification_count = self.get(
|
||||
"/service/{}/notification-count".format(service_id)
|
||||
)
|
||||
redis_client.set(
|
||||
f"notification-count-{service_id}", json.dumps(notification_count), ex=30
|
||||
)
|
||||
|
||||
return notification_count
|
||||
|
||||
def get_service_invite_data(self, redis_key):
|
||||
"""
|
||||
|
||||
@@ -42,5 +42,7 @@
|
||||
{%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
|
||||
{%- if params.autocomplete %} autocomplete="{{ params.autocomplete}}"{% endif %}
|
||||
{%- if params.pattern %} pattern="{{ params.pattern }}"{% endif %}
|
||||
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}>
|
||||
{%- for attribute, value in params.attributes %} {{ attribute }}="{{ value }}"{% endfor -%}
|
||||
{%- if params.required %} required{% endif %}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -54,6 +54,9 @@
|
||||
<a href="https://www.gsa.gov/reference/reports/budget-performance"
|
||||
class="usa-identifier__required-link">Performance reports</a>
|
||||
</li>
|
||||
<li class="usa-identifier__required-links-item">
|
||||
<a href="/acceptable-use-policy" class="usa-identifier__required-link">Acceptable use policy</a>
|
||||
</li>
|
||||
<li class="usa-identifier__required-links-item">
|
||||
<a href="https://www.gsa.gov/website-information/website-policies"
|
||||
class="usa-identifier__required-link">Privacy policy</a>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
data-{{ key }}="{{ val }}"
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
novalidate
|
||||
>
|
||||
{{ caller() }}
|
||||
</form>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<header class="usa-header usa-header--extended">
|
||||
<div class="usa-nav-container">
|
||||
<div class="usa-navbar">
|
||||
<div class="display-flex flex-align-center flex-justify">
|
||||
<div class="display-flex flex-align-center flex-justify width-full">
|
||||
<div class="usa-logo display-flex flex-align-center flex-justify" id="-logo">
|
||||
<div class="logo-img display-flex">
|
||||
<a href="/">
|
||||
|
||||
@@ -13,22 +13,13 @@
|
||||
safe_error_message=False,
|
||||
rows=8,
|
||||
extra_form_group_classes='',
|
||||
placeholder=''
|
||||
placeholder='',
|
||||
required=None
|
||||
) %}
|
||||
<div
|
||||
class="form-group{% if field.errors %} form-group-error{% endif %} {{ extra_form_group_classes }}"
|
||||
class="usa-form-group{% if field.errors %} usa-form-group--error{% endif %} {{ extra_form_group_classes }}"
|
||||
data-module="{% if autofocus %}autofocus{% elif colour_preview %}colour-preview{% endif %}"
|
||||
>
|
||||
{% if field.errors %}
|
||||
<div class="usa-alert usa-alert--error edit-textbox-error-mt" role="alert">
|
||||
<div class="usa-alert__body">
|
||||
<h4 class="usa-alert__heading">Error message</h4>
|
||||
<p class="usa-alert__text" data-module="track-error" data-error-type="{{ field.errors[0] }}" data-error-label="{{ field.name }}">
|
||||
{% if not safe_error_message %}{{ field.errors[0] }}{% else %}{{ field.errors[0]|safe }}{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<label class="usa-label" for="{{ field.name }}">
|
||||
{% if label %}
|
||||
{{ label }}
|
||||
@@ -41,6 +32,12 @@
|
||||
{{ hint }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if field.errors %}
|
||||
<span id="{{ field.name}}-error" class="usa-error-message" data-module="track-error" data-error-type="{{ field.errors[0] }}" data-error-label="{{ field.name }}">
|
||||
<span class="usa-sr-only">Error:</span>
|
||||
{% if not safe_error_message %}{{ field.errors[0] }}{% else %}{{ field.errors[0]|safe }}{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
{%
|
||||
if highlight_placeholders or autosize
|
||||
%}
|
||||
@@ -59,6 +56,8 @@
|
||||
data_highlight_placeholders='true' if highlight_placeholders else 'false',
|
||||
rows=rows|string,
|
||||
placeholder=placeholder,
|
||||
aria_describedby=field.name+"-error",
|
||||
required='required' if required else None,
|
||||
**kwargs
|
||||
) }}
|
||||
{% if suffix %}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% set page_title = "About Notify" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
{{page_title}}
|
||||
{% endblock %}
|
||||
@@ -27,7 +26,7 @@
|
||||
{% set product_highlights = [
|
||||
{
|
||||
"svg_src": "#send",
|
||||
"card_heading": "Send customized one-way customized messages",
|
||||
"card_heading": "Send customized one-way messages",
|
||||
"p_text": "Upload a file with recipient phone numbers and Notify.gov sends customized messages",
|
||||
},
|
||||
{
|
||||
@@ -68,7 +67,7 @@
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<p><a href="/join-notify">See if Notify is right for you</a></p>
|
||||
<p>Notify.gov is a product of the <a href="#">Public Benefits Studio</a>, a product accelerator inside
|
||||
<p>Notify.gov is a product of the <a href="/studio">Public Benefits Studio</a>, a product accelerator inside
|
||||
the federal government. </p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
@@ -51,35 +51,37 @@
|
||||
{
|
||||
"image_src": asset_url('images/calendar.svg'),
|
||||
"card_heading": "Reminders",
|
||||
"p_text": "In a text bubble // Your Quality Control food phone interview is on ((date)) at ((time)). Failure to
|
||||
"p_text": "Your Quality Control food phone interview is on ((date)) at ((time)). Failure to
|
||||
attend may lead to closure of your benefits. Call 1-800-222-3333 with questions.",
|
||||
"alt_text": "reminder text example"
|
||||
},
|
||||
{
|
||||
"image_src": asset_url('images/alert.svg'),
|
||||
"card_heading": "Alerts to take action",
|
||||
"p_text": "In a text bubble // Your household's Medicaid coverage is expiring. To keep getting Medicaid, you must
|
||||
"p_text": "Your household's Medicaid coverage is expiring. To keep getting Medicaid, you must
|
||||
complete your renewal by ((date)). You can renew online at dhs.state.gov…",
|
||||
"alt_text": "alerts text example"
|
||||
},
|
||||
{
|
||||
"image_src": asset_url('images/alarm.svg'),
|
||||
"card_heading": "Important status updates",
|
||||
"p_text": "In a text bubble // Your passport has been issued at the Los Angeles Passport Agency. Please come to the
|
||||
"p_text": "Your passport has been issued at the Los Angeles Passport Agency. Please come to the
|
||||
desk between 1:30pm and 2:30pm today to pick up your passport…",
|
||||
"alt_text": "status update text example"
|
||||
},
|
||||
] %}
|
||||
{% for item in card_contents %}
|
||||
<div class="radius-lg border-2px maxw-tablet">
|
||||
<div class="grid-row grid-gap-4 padding-4 padding-y-3 flex-align-center">
|
||||
<div class="grid-col flex-3">
|
||||
<p><b>{{item.card_heading}}</b></p>
|
||||
<p>{{item.p_text}}</p>
|
||||
<div class="grid-container-tablet padding-3 radius-lg border-2px margin-left-0 ">
|
||||
<h3 class="usa-card__heading padding-y-2">{{item.card_heading}}</h3>
|
||||
<div class="grid-row grid-gap-3 flex-align-center">
|
||||
<div class="grid-col-auto ">
|
||||
<p class="sms-message-wrapper">{{item.p_text}}</p>
|
||||
</div>
|
||||
<div class="grid-col-fill">
|
||||
{% if item.image_src %}
|
||||
<img src="{{ item.image_src }}" alt="{{ item.alt_text }}" class="height-15" />
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if item.image_src %}
|
||||
<img src="{{item.image_src}}" alt="{{ item.alt_text }}" class="height-15" />
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
38
app/templates/views/acceptable-use-policy.html
Normal file
38
app/templates/views/acceptable-use-policy.html
Normal file
@@ -0,0 +1,38 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% set page_title = "Acceptable Use Policy" %}
|
||||
|
||||
{% block per_page_title %}{{page_title}}{% endblock %}
|
||||
|
||||
{% block content_column_content %}
|
||||
|
||||
<section class="usa-prose">
|
||||
<h1>{{page_title}}</h1>
|
||||
<p>Use of the application indicates agreement with this acceptable use policy.</p>
|
||||
<p>Acceptable uses of Notify.gov for this trial period include:</p>
|
||||
<ul>
|
||||
<li>Configuring test services and sending test SMS messages to learn and demonstrate how Notify.gov works.</li>
|
||||
<li>Reviewing data provided by Notify.gov and configuring available settings.</li>
|
||||
</ul>
|
||||
<p>
|
||||
In order to help us keep Notify.gov secure, we require that you use your account appropriately. When you use Notify.gov, you agree that you’ll respect these rules of behavior:
|
||||
</p>
|
||||
<ul>
|
||||
<li>Conduct only authorized business on the system.</li>
|
||||
<li>Maintain the confidentiality of your authentication credentials; a Notify.gov operator should never ask you to reveal them. We recommend using a password manager and strong credentials.</li>
|
||||
<li>Log out when you no longer need session access. Never leave your computer unattended while logged into Notify.gov.</li>
|
||||
<li>Report all security incidents or suspected incidents (such as improper or suspicious acts) related to Notify.gov systems and networks to Notify.gov support.</li>
|
||||
<li>Safeguard system resources against waste, loss, abuse, unauthorized use or disclosure, and misappropriation.</li>
|
||||
<li>Don’t process U.S. classified national security information on the system.</li>
|
||||
<li>Don’t browse, search or reveal information hosted by Notify.gov except as required to perform your legitimate tasks or assigned duties.</li>
|
||||
<li>Don’t retrieve information, or in any other way disclose information, for someone who does not have authority to access that information.</li>
|
||||
<li>Don’t intentionally use a client that makes use of obsolete or insecure encryption algorithms.</li>
|
||||
<li>Don’t configure your browser to ignore security warnings which may involve your connection with Notify.gov; report warnings that you can’t explain to Notify.gov support.</li>
|
||||
<li>If you believe you’ve been granted more access than necessary to perform your legitimate tasks or assigned duties, immediately notify Notify.gov support.</li>
|
||||
<li>Don’t share your account with another person or create anonymous or group accounts. Your account is just for you.</li>
|
||||
</ul>
|
||||
<p>Access to systems and networks owned by Notify.gov is governed by, and subject to, all federal laws, including, but not limited to, the Privacy Act, 5 U.S.C. 552a, if the applicable Notify.gov system maintains individual Privacy Act information. Access to Notify.gov systems constitutes consent to the retrieval and disclosure of the information within the scope of your authorized access, subject to the Privacy Act, and applicable state and federal laws.</p>
|
||||
<p>Please contact Notify.gov support if you have questions about these rules or don’t understand them.</p>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
@@ -15,7 +15,7 @@
|
||||
aria-label="For partnership inquiries">
|
||||
<div class="usa-summary-box__body">
|
||||
<div class="usa-summary-box__text">
|
||||
<p>If you are a current Notify.gov partner and have technical issues or questions, we are available at <a
|
||||
<p class="margin-0">If you are a current Notify.gov partner and have technical issues or questions, we are available at <a
|
||||
href="mailto:notify-support@gsa.gov"
|
||||
aria-label="Email Notify for technical questions at notify-support@gsa.gov">notify-support@gsa.gov</a></p>
|
||||
</div>
|
||||
|
||||
@@ -29,9 +29,11 @@
|
||||
|
||||
{% call form_wrapper() %}
|
||||
<div class="grid-row">
|
||||
<div class="tablet:grid-col-9 mobile-lg:grid-col-12">
|
||||
<div class="tablet:grid-col-9 mobile-lg:grid-col-12" aria-live="polite" role="alert">
|
||||
{{ form.name(param_extensions={
|
||||
"extra_form_group_classes": "margin-bottom-2",
|
||||
"id": "name",
|
||||
"required": True,
|
||||
"hint": {"text": "Your recipients will not see this"}
|
||||
}) }}
|
||||
{{ textbox(
|
||||
@@ -41,7 +43,8 @@
|
||||
hint=content_hint,
|
||||
rows=5,
|
||||
extra_form_group_classes='margin-bottom-1',
|
||||
placeholder='Edit me! Check out the Personalization section below for details on cool ((stuff)) you can do with your messages!'
|
||||
placeholder='Edit me! Check out the Personalization section below for details on cool ((stuff)) you can do with your messages!',
|
||||
required=True
|
||||
) }}
|
||||
{% if current_user.platform_admin %}
|
||||
{{ form.process_type }}
|
||||
|
||||
@@ -72,14 +72,14 @@
|
||||
aria-labelledby="summary-box-how-to-get-started">
|
||||
<div class="usa-summary-box__body">
|
||||
<div class="usa-summary-box__text">
|
||||
<p>Interested in trying Notify.gov before signing an agreement? We can provide qualifying partners with access
|
||||
<p class="margin-0">Interested in trying Notify.gov before signing an agreement? We can provide qualifying partners with access
|
||||
to Trial Mode to review Notify.gov features before deciding. In Trial Mode, you can test sending messages,
|
||||
explore the personalization and customization features, and review sample delivery reports.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4>Tell us about your program</h4>
|
||||
<h3 class="font-body-md">Tell us about your program</h3>
|
||||
<p class="padding-bottom-3">
|
||||
Let’s determine if Notify.gov is a good fit for your organization. To <b>get started</b>, we’ll ask you for
|
||||
information such as:
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
data_kwargs={'force-focus': True}
|
||||
) %}
|
||||
<div class="grid-row">
|
||||
<div class="grid-col-12 {% if form.placeholder_value.label.text == 'phone number' %}extra-tracking{% endif %}" aria-live="polite" role="alert">
|
||||
{{ form.placeholder_value(param_extensions={"classes": ""}) }}
|
||||
<div class="grid-col-12 {% if form.placeholder_value.label.text == 'phone number' %}extra-tracking{% endif %}">
|
||||
{{ form.placeholder_value(param_extensions={"id": "phone-number"}) }}
|
||||
</div>
|
||||
{% if skip_link or link_to_upload %}
|
||||
<div class="grid-col-12 margin-top-1">
|
||||
|
||||
@@ -90,8 +90,4 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<!--<div class="">
|
||||
{{ copy_to_clipboard(template.id, name="Template ID", thing='template ID') }}
|
||||
</div>-->
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user