Merge branch 'main' of https://github.com/GSA/notifications-admin into 1043-move-account-info-into-utility-nav

This commit is contained in:
Jonathan Bobel
2024-01-01 10:35:05 -05:00
49 changed files with 412 additions and 3212 deletions

View File

@@ -19,17 +19,22 @@
class="form-group{% if field.errors %} 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 }}
{% else %}
{{ field.label.text }}
{% endif %}
{% if field.errors %}
<span class="error-message" 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 %}
</span>
{% endif %}
</label>
{% if hint %}
<div class="usa-hint">

View File

@@ -1,31 +0,0 @@
{% set service = current_service -%}
{% set organization = service.organization -%}
{% set user = current_user -%}
Service: {{ service.name }}
{{ url_for('main.service_dashboard', service_id=service.id, _external=True) }}
---
Organization type: {{ service.organization_type_label }}
{%- if organization.name %} (organization is {{ organization.name }})
{%- else %} (domain is {{ user.email_domain }})
{%- endif %}.
{%- if organization.request_to_go_live_notes %} {{ organization.request_to_go_live_notes }}{% endif %}
{%- if organization.agreement_signed_by %}
Agreement signed by: {{ organization.agreement_signed_by.email_address }}
{% endif -%}
{%- if organization.agreement_signed_on_behalf_of_email_address -%}
Agreement signed on behalf of: {{ organization.agreement_signed_on_behalf_of_email_address }}
{%- endif %}
Emails in next year: {{ service.volume_email|format_thousands }}
Text messages in next year: {{ service.volume_sms|format_thousands }}
Consent to research: {{ service.consent_to_research|format_yes_no }}
Other live services for that user: {{ user.live_services|format_yes_no }}
Service reply-to address: {{ service.default_email_reply_to_address or "not set" }}
---
Request sent by {{ user.email_address }}
Requesters user page: {{ url_for('main.user_information', user_id=user.id, _external=True) }}

View File

@@ -1,5 +0,0 @@
{{ content }}
{% if current_service -%}
Service: "{{ current_service.name }}"
{{ url_for('main.service_dashboard', service_id=current_service.id, _external=True) }}
{% endif %}

View File

@@ -10,7 +10,12 @@ Error
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": back_link }) }}
<!--hide back link for one-off sends because the user never created a csv file-->
{% if recipients|length == 1 and not recipients.allowed_to_send_to and not recipients.missing_column_headers %}
<!--do nothing-->
{% else %}
{{ usaBackLink({ "href": back_link }) }}
{% endif %}
{% endblock %}
{% block maincolumn_content %}
@@ -130,7 +135,10 @@ Error
{% endcall %}
</div>
<!--hide the upload button and back to top link for one off sends-->
{% if recipients|length == 1 and not recipients.allowed_to_send_to and not recipients.missing_column_headers %}
<!-- do nothing -->
{% else %}
<div class="js-stick-at-top-when-scrolling">
<div class="form-group">
{% if not request.args.from_test %}
@@ -144,6 +152,7 @@ Error
</div>
<a href="#content" class="usa-link back-to-top-link">Back to top</a>
</div>
{% endif %}
{% if not request.args.from_test %}
@@ -210,4 +219,4 @@ recipients.column_headers %}
<h2 class="font-body-lg">Preview of {{ template.name }}</h2>
{{ template|string }}
{% endblock %}
{% endblock %}

View File

@@ -53,7 +53,7 @@
{% if not current_user.is_authenticated or not current_service %}
<p>When youre ready to send messages to people outside your team, go to the <b class="bold">Settings</b> page and select <b class="bold">Request to go live</b>. Well approve your request within one working day.</p>
{% else %}
<p>You should <a class="usa-link" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a> when youre ready to send messages to people outside your team. Well approve your request within one working day.</p>
<p>You should <a class="usa-link" href="{{ url_for('.support') }}">request to go live</a> when youre ready to send messages to people outside your team. Well approve your request within one working day.</p>
{% endif %}
<!-- <p>Check <a class="usa-link" href="{{ url_for('main.how_to_pay') }}">how to pay</a> if youre planning to exceed the <a class="usa-link" href="{{ url_for('.pricing', _anchor='text-messages') }}">free text message allowance</a>.</p> -->
</li>

View File

@@ -43,6 +43,8 @@
<span class="live-search-relevant">{{ user.email_address }}</span> (invited)
{%- elif user.status == 'cancelled' -%}
<span class="live-search-relevant">{{ user.email_address }}</span> (cancelled invite)
{%- elif user.status == 'expired' -%}
<span class="live-search-relevant">{{ user.email_address }}</span> (expired invite)
{%- elif user.id == current_user.id -%}
<span class="live-search-relevant">(you)</span>
{% else %}
@@ -84,6 +86,8 @@
{% if current_user.has_permissions('manage_service') %}
{% if user.status == 'pending' %}
<a class="user-list-edit-link usa-link" href="{{ url_for('.cancel_invited_user', service_id=current_service.id, invited_user_id=user.id)}}">Cancel invitation<span class="usa-sr-only"> for {{ user.email_address }}</span></a>
{% elif user.status == 'expired' %}
<a class="user-list-edit-link usa-link" href="{{ url_for('.resend_invite', service_id=current_service.id, invited_user_id=user.id)}}">Resend invite<span class="usa-sr-only"> for {{ user.email_address }}</span></a>
{% elif user.is_editable_by(current_user) %}
<a class="user-list-edit-link usa-link" href="{{ url_for('.edit_user_permissions', service_id=current_service.id, user_id=user.id)}}">Change details<span class="usa-sr-only"> for {{ user.name }} {{ user.email_address }}</span></a>
{% endif %}

View File

@@ -1,30 +0,0 @@
{% extends "org_template.html" %}
{% from "components/form.html" import form_wrapper %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/textbox.html" import textbox %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block org_page_title %}
Edit request to go live notes
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.organization_settings', org_id=current_org.id) }) }}
{% endblock %}
{% block maincolumn_content %}
{{ page_header("Edit request to go live notes") }}
<div class="grid-row">
<div class="grid-col-10">
<p>
Text entered here will be displayed in the Zendesk ticket when a service
belonging to this organization requests to go live.
</p>
{% call form_wrapper() %}
{{ textbox(form.request_to_go_live_notes, width='1-1', rows=3, autosize=True) }}
{{ page_footer('Save') }}
{% endcall %}
</div>
</div>
{% endblock %}

View File

@@ -34,16 +34,6 @@
)
}}
{% endcall %}
{% call row() %}
{{ text_field('Request to go live notes') }}
{{ optional_text_field(current_org.request_to_go_live_notes, default='None') }}
{{ edit_field(
'Change',
url_for('.edit_organization_go_live_notes', org_id=current_org.id),
suffix='go live notes for the organization'
)
}}
{% endcall %}
{% call row() %}
{{ text_field('Billing details')}}

View File

@@ -206,7 +206,7 @@
</p>
<p>
Problems or comments?
<a class="usa-link" href="{{ url_for('main.support') }}">Give feedback</a>.
<a class="usa-link" href="{{ url_for('main.support') }}">Contact us</a>.
</p>
{% endif %}

View File

@@ -1,42 +0,0 @@
{% extends "withnav_template.html" %}
{% from "components/banner.html" import banner_wrapper %}
{% from "components/form.html" import form_wrapper %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block service_page_title %}
Tell us how many messages you expect to send
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('main.request_to_go_live', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="grid-col-12">
{% if not form.at_least_one_volume_filled %}
{% call banner_wrapper(type='dangerous') %}
<h1 class='banner-title'>
Enter the number of messages you expect to send in the next year
</h1>
{% endcall %}
{% else %}
{{ page_header('Tell us how many messages you expect to send') }}
{% endif %}
{% call form_wrapper() %}
<div class="form-group">
{{ form.volume_email(param_extensions={
"hint": {"text": "For example, 50,000"},
}) }}
{{ form.volume_sms(param_extensions={
"hint": {"text": "For example, 50,000"},
}) }}
</div>
{{ form.consent_to_research }}
{{ page_footer('Continue') }}
{% endcall %}
</div>
</div>
{% endblock %}

View File

@@ -1,75 +0,0 @@
{% extends "withnav_template.html" %}
{% from "components/form.html" import form_wrapper %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/task-list.html" import task_list_wrapper, task_list_item %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block service_page_title %}
Before you request to go live
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('main.service_settings', service_id=current_service.id) }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="grid-col-12">
{{ page_header('Before you request to go live') }}
{% call task_list_wrapper() %}
{{ task_list_item(
current_service.has_estimated_usage,
'Tell us how many messages you expect to send',
url_for('main.estimate_usage', service_id=current_service.id),
) }}
{{ task_list_item(
current_service.has_team_members,
'Add a team member who can manage settings, team and usage',
url_for('main.manage_users', service_id=current_service.id),
) }}
{{ task_list_item(
current_service.has_templates,
'Add templates with examples of the content you plan to send',
url_for('main.choose_template', service_id=current_service.id),
) }}
{% if current_service.intending_to_send_email %}
{{ task_list_item(
current_service.has_email_reply_to_address,
'Add a reply-to email address',
url_for('main.service_email_reply_to', service_id=current_service.id),
) }}
{% endif %}
{% if (
current_service.intending_to_send_sms
and current_service.shouldnt_use_govuk_as_sms_sender
) %}
{{ task_list_item(
not current_service.sms_sender_is_govuk,
'Change your text message sender name',
url_for('main.service_sms_senders', service_id=current_service.id),
) }}
{% endif %}
{% endcall %}
{% if not current_user.is_gov_user %}
<p>
Only team members with a government email address can request to go live.
</p>
{% elif (not current_service.go_live_checklist_completed) %}
<p>
You must complete these steps before you can request to go live.
</p>
{% else %}
<p>
When we receive your request well get back to you within one working day.
</p>
<p class="bottom-gutter">
By requesting to go live youre agreeing to our <a class="usa-link" href="{{ url_for('.terms') }}">terms of use</a>.
</p>
{% call form_wrapper() %}
{{ page_footer('Request to go live') }}
{% endcall %}
{% endif %}
</div>
</div>
{% endblock %}

View File

@@ -1,28 +0,0 @@
{% extends "withnav_template.html" %}
{% from "components/page-header.html" import page_header %}
{% block service_page_title %}
Your service is already live
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="grid-col-12">
{{ page_header('Your service is already live') }}
<p>
{% if current_service.go_live_at %}
{{ current_service.name }} went live on {{ current_service.go_live_at | format_date_normal }}.
{% else %}
{{ current_service.name }} is already live.
{% endif %}
</p>
<p>
<a class="usa-link" href="{{ url_for('.choose_account') }}">Switch service</a>
if you want to make a different service live.
</p>
</div>
</div>
{% endblock %}

View File

@@ -1,46 +0,0 @@
{% extends "withoutnav_template.html" %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block per_page_title %}
Out of hours emergencies
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.support') }) }}
{% endblock %}
{% block maincolumn_content %}
{{ page_header('Out of hours emergencies')}}
<div class="grid-row">
<div class="grid-col-8">
<p>
First, check the
<a class="usa-link" href="https://status.notifications.service.gov.uk">system status page</a>.
You do not need to contact us if
the problem youre having is listed on that page.
</p>
<p>
Otherwise, contact us using the emergency email address we
gave you or your service manager when we made your service live.
</p>
<p>
Well reply within 30 minutes and give you hourly updates
until the problems fixed.
</p>
<p>
We do not offer out of hours support if your service is in
trial mode.
</p>
<h2 class="font-body-lg">Any other problems</h2>
<p class="bottom-gutter-2">
<a class="usa-link" href="{{ url_for('main.feedback', ticket_type='report-problem', severe='no') }}">Fill in this form</a>
and well get back to you by the next working day.
</p>
</div>
</div>
{% endblock %}

View File

@@ -1,42 +0,0 @@
{% extends "withoutnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import sticky_page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/form.html" import form_wrapper %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block per_page_title %}
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": back_link }) }}
{% endblock %}
{% block maincolumn_content %}
{{ page_header(page_title) }}
<div class="grid-row">
<div class="grid-col-8">
{% if show_status_page_banner %}
<div class="panel panel-border-wide">
<p>
Check our <a class="usa-link" href="https://status.notifications.service.gov.uk">system status</a>
page to see if there are any known issues with Notify.gov.
</p>
</div>
{% endif %}
{% call form_wrapper() %}
{{ textbox(form.feedback, width='1-1', hint='', rows=10, autosize=True) }}
{% if not current_user.is_authenticated %}
{{ form.name(param_extensions={"classes": ""}) }}
{{ form.email_address(param_extensions={"classes": ""}) }}
{% else %}
<p>Well reply to {{ current_user.email_address }}</p>
{% endif %}
{{ sticky_page_footer('Send') }}
{% endcall %}
</div>
</div>
{% endblock %}

View File

@@ -1,50 +0,0 @@
{% extends "withoutnav_template.html" %}
{% from "components/page-header.html" import page_header %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block per_page_title %}
The Notify.gov service is for people who work in the government
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.support') }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="grid-col-8">
{{ page_header('The Notify.gov service is for people who work in the government') }}
<p>
We cannot give advice to the public. We do not have access to information about you held by government departments.
</p>
<p>
There are other pages on Notify.gov where you can get help:
</p>
<h2 class="govuk-heading-m">
<a class="usa-link" href="https://www.gov.uk/coronavirus">Coronavirus (COVID-19)</a>
</h2>
<p>
Find guidance and support.
</p>
<h2 class="govuk-heading-m">
<a class="usa-link" href="https://www.gov.uk/contact">Contact the government</a>
</h2>
<p>
Ask about benefits, driving, transport, tax, and more.
</p>
<h2 class="govuk-heading-m">
<a class="usa-link" href="https://www.gov.uk/report-suspicious-emails-websites-phishing">Report internet scams and phishing</a>
</h2>
<p>
Advice on suspicious emails and text messages.
</p>
</div>
</div>
{% endblock %}

View File

@@ -1,38 +0,0 @@
{% extends "withoutnav_template.html" %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block per_page_title %}
Thanks for contacting us
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.support') }) }}
{% endblock %}
{% block maincolumn_content %}
{{ page_header('Thanks for contacting us') }}
<p>
{% if out_of_hours_emergency %}
Well reply in the next 30 minutes.
{% else %}
{% if email_address_provided %}
{% if out_of_hours %}
Well reply within one working day.
{% else %}
Well aim to read your message in the next 30 minutes and well reply within one
working day.
{% endif %}
{% else %}
{% if out_of_hours %}
Well read your message when were back in the office.
{% else %}
Well aim to read your message in the next 30 minutes.
{% endif %}
{% endif %}
{% endif %}
</p>
{% endblock %}

View File

@@ -1,62 +0,0 @@
{% extends "withoutnav_template.html" %}
{% from "components/page-footer.html" import page_footer %}
{% from "components/page-header.html" import page_header %}
{% from "components/form.html" import form_wrapper %}
{% from "components/components/back-link/macro.njk" import usaBackLink %}
{% block per_page_title %}
{{ page_title }}
{% endblock %}
{% block backLink %}
{{ usaBackLink({ "href": url_for('.support') }) }}
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="grid-col-8">
{{ page_header(page_title) }}
{% call form_wrapper() %}
{{ form.severe }}
{{ page_footer('Continue') }}
{% endcall %}
<h2 class="heading-small">
Its only an emergency if:
</h2>
<ul class="list list-bullet">
<li>
no one in your team can log in
</li>
<li>
you get a technical difficulties error message when you try
to upload a file
</li>
<li>
you get a 500 response code when you try to send messages
using the API
</li>
</ul>
<h2 class="heading-small">
Its not an emergency if:
</h2>
<ul class="list list-bullet bottom-gutter">
<li>
all your messages stay in sending for a few hours
</li>
<li>
you send the wrong message by accident
</li>
<li>
a team member uses Notify.gov to send an
inappropriate message
</li>
<li>
your system is telling the Notify.gov API to send the wrong
message
</li>
</ul>
</div>
</div>
{% endblock %}

View File

@@ -17,7 +17,7 @@
{% if current_service and current_service.trial_mode %}
<p>
To remove these restrictions, you can <a class="usa-link" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a>.</p>
To remove these restrictions, you can <a class="usa-link" href="{{ url_for('.support') }}">request to go live</a>.</p>
{% else %}
<p>
To remove these restrictions:
@@ -38,6 +38,6 @@
<li>update your settings so youre ready to send and receive messages</li>
<li>accept our terms of use</li>
</ul>
{% endblock %}