diff --git a/.ds.baseline b/.ds.baseline index 85c0f6ad1..0ded707f2 100644 --- a/.ds.baseline +++ b/.ds.baseline @@ -684,5 +684,5 @@ } ] }, - "generated_at": "2025-01-15T20:07:34Z" + "generated_at": "2025-01-16T16:38:48Z" } diff --git a/app/assets/sass/uswds/_legacy-styles.scss b/app/assets/sass/uswds/_legacy-styles.scss index 85da17321..4af2cc6f6 100644 --- a/app/assets/sass/uswds/_legacy-styles.scss +++ b/app/assets/sass/uswds/_legacy-styles.scss @@ -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; diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 0bb1aab7e..7fafb8276 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -1024,3 +1024,7 @@ nav.nav { font-size: units(3); font-weight: bold; } + +.form-control-error { + border: 4px solid #b10e1e +} diff --git a/app/main/views/index.py b/app/main/views/index.py index 51c865b81..8b63d2bd8 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -300,6 +300,13 @@ def studio(): ) +@main.route("/acceptable-use-policy") +def acceptable_use_policy(): + return render_template( + "views/acceptable-use-policy.html", + ) + + # --- Redirects --- # diff --git a/app/main/views/templates.py b/app/main/views/templates.py index 5c59e1e7c..3a7315db7 100644 --- a/app/main/views/templates.py +++ b/app/main/views/templates.py @@ -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", ) diff --git a/app/notify_client/billing_api_client.py b/app/notify_client/billing_api_client.py index a6226f14a..b1ffc19f0 100644 --- a/app/notify_client/billing_api_client.py +++ b/app/notify_client/billing_api_client.py @@ -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( diff --git a/app/notify_client/service_api_client.py b/app/notify_client/service_api_client.py index 3a0655d9e..0229fee3d 100644 --- a/app/notify_client/service_api_client.py +++ b/app/notify_client/service_api_client.py @@ -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): """ diff --git a/app/templates/components/components/input/template.njk b/app/templates/components/components/input/template.njk index 7f5634651..9e2cff08c 100644 --- a/app/templates/components/components/input/template.njk +++ b/app/templates/components/components/input/template.njk @@ -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 %} +/> diff --git a/app/templates/components/footer.html b/app/templates/components/footer.html index d7aa2bf1a..0de0b5fc9 100644 --- a/app/templates/components/footer.html +++ b/app/templates/components/footer.html @@ -54,6 +54,9 @@ Performance reports +
- {% if not safe_error_message %}{{ field.errors[0] }}{% else %}{{ field.errors[0]|safe }}{% endif %} -
-See if Notify is right for you
-Notify.gov is a product of the Public Benefits Studio, a product accelerator inside +
Notify.gov is a product of the Public Benefits Studio, a product accelerator inside the federal government.
{% endblock %} diff --git a/app/templates/views/about/why-text-messaging.html b/app/templates/views/about/why-text-messaging.html index c70629e58..c0d6a29a1 100644 --- a/app/templates/views/about/why-text-messaging.html +++ b/app/templates/views/about/why-text-messaging.html @@ -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 %} -{{item.card_heading}}
-{{item.p_text}}
+{{item.p_text}}
+Use of the application indicates agreement with this acceptable use policy.
+Acceptable uses of Notify.gov for this trial period include:
++ 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: +
+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.
+Please contact Notify.gov support if you have questions about these rules or don’t understand them.
+If you are a current Notify.gov partner and have technical issues or questions, we are available at If you are a current Notify.gov partner and have technical issues or questions, we are available at notify-support@gsa.gov
Interested in trying Notify.gov before signing an agreement? We can provide qualifying partners with access +
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.
Let’s determine if Notify.gov is a good fit for your organization. To get started, we’ll ask you for information such as: diff --git a/app/templates/views/send-test.html b/app/templates/views/send-test.html index 720849ae6..be3b32a9a 100644 --- a/app/templates/views/send-test.html +++ b/app/templates/views/send-test.html @@ -37,8 +37,8 @@ data_kwargs={'force-focus': True} ) %}