mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-06 10:31:03 -04:00
Merge pull request #722 from GSA/notify-admin-211
notify-admin-211 remove nhs-specific code
This commit is contained in:
@@ -60,7 +60,6 @@ from app.main.forms import (
|
||||
SomethingElseBrandingForm,
|
||||
)
|
||||
from app.utils import DELIVERED_STATUSES, FAILURE_STATUSES, SENDING_STATUSES
|
||||
from app.utils.branding import NHS_EMAIL_BRANDING_ID
|
||||
from app.utils.branding import get_email_choices as get_email_branding_choices
|
||||
from app.utils.time import parse_naive_dt
|
||||
from app.utils.user import (
|
||||
@@ -924,23 +923,6 @@ def email_branding_govuk_and_org(service_id):
|
||||
return render_template('views/service-settings/branding/email-branding-govuk-org.html')
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/email-branding/nhs", methods=['GET', 'POST'])
|
||||
@user_has_permissions('manage_service')
|
||||
def email_branding_nhs(service_id):
|
||||
check_email_branding_allowed_for_service('nhs')
|
||||
|
||||
if request.method == 'POST':
|
||||
current_service.update(email_branding=NHS_EMAIL_BRANDING_ID)
|
||||
|
||||
flash('You’ve updated your email branding', 'default')
|
||||
return redirect(url_for('.service_settings', service_id=current_service.id))
|
||||
|
||||
return render_template(
|
||||
'views/service-settings/branding/email-branding-nhs.html',
|
||||
nhs_branding_id=NHS_EMAIL_BRANDING_ID
|
||||
)
|
||||
|
||||
|
||||
@main.route("/services/<uuid:service_id>/service-settings/email-branding/organization", methods=['GET', 'POST'])
|
||||
@user_has_permissions('manage_service')
|
||||
def email_branding_organization(service_id):
|
||||
|
||||
@@ -347,8 +347,6 @@ class User(JSONModel, UserMixin):
|
||||
def default_organization_type(self):
|
||||
if self.default_organization:
|
||||
return self.default_organization.organization_type
|
||||
if self.has_nhs_email_address:
|
||||
return 'nhs'
|
||||
return None
|
||||
|
||||
@property
|
||||
@@ -359,12 +357,6 @@ class User(JSONModel, UserMixin):
|
||||
self.trial_mode_services
|
||||
)
|
||||
|
||||
@property
|
||||
def has_nhs_email_address(self):
|
||||
return self.email_address.lower().endswith((
|
||||
'@nhs.uk', '.nhs.uk', '@nhs.net', '.nhs.net',
|
||||
))
|
||||
|
||||
def serialize(self):
|
||||
dct = {
|
||||
"id": self.id,
|
||||
|
||||
@@ -183,10 +183,8 @@ class MainNavigation(Navigation):
|
||||
},
|
||||
'settings': {
|
||||
# 'add_organization_from_gp_service',
|
||||
# 'add_organization_from_nhs_local_service',
|
||||
'email_branding_govuk',
|
||||
'email_branding_govuk_and_org',
|
||||
'email_branding_nhs',
|
||||
'email_branding_organization',
|
||||
'email_branding_request',
|
||||
'email_branding_something_else',
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/branding-preview.html" import email_branding_preview %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Check your new branding
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({
|
||||
"href": url_for('.email_branding_request', service_id=current_service.id)
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header('Check your new branding') }}
|
||||
|
||||
<p>
|
||||
Emails from {{ current_service.name }} will look like this.
|
||||
</p>
|
||||
{{ email_branding_preview(nhs_branding_id) }}
|
||||
|
||||
<h2 class="font-body-lg">Before you continue</h2>
|
||||
|
||||
<p>Make sure you’re allowed to use NHS branding.</p>
|
||||
|
||||
<p>
|
||||
If you’re not sure, <a class="usa-link" href="https://www.england.nhs.uk/nhsidentity/identity-guidelines/who-can-use-the-nhs-identity/">check the guidance on the NHS website</a>.
|
||||
</p>
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ page_footer('Use this branding') }}
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,5 @@
|
||||
from app.models.organization import Organization
|
||||
|
||||
NHS_EMAIL_BRANDING_ID = 'a7dc4e56-660b-4db7-8cff-12c37b12b5ea'
|
||||
|
||||
|
||||
def get_email_choices(service):
|
||||
organization_branding_id = service.organization.email_branding_id if service.organization else None
|
||||
|
||||
@@ -87,7 +87,6 @@ EXCLUDED_ENDPOINTS = tuple(map(Navigation.get_endpoint_with_blueprint, {
|
||||
'email_branding',
|
||||
'email_branding_govuk',
|
||||
'email_branding_govuk_and_org',
|
||||
'email_branding_nhs',
|
||||
'email_branding_organization',
|
||||
'email_branding_request',
|
||||
'email_branding_something_else',
|
||||
|
||||
Reference in New Issue
Block a user