mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 08:16:51 -04:00
remove dvla_organisation and other unused things
dvla_organisation, branding_dict, a weird `branding` property on
update_service. all gone 💥
This commit is contained in:
@@ -886,27 +886,6 @@ class CreateOrUpdateOrganisation(StripWhitespaceForm):
|
||||
name = StringField('Name', validators=[DataRequired()])
|
||||
|
||||
|
||||
class LetterBranding(StripWhitespaceForm):
|
||||
|
||||
def __init__(self, choices=[], *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.dvla_org_id.choices = list(sorted(
|
||||
choices,
|
||||
key=lambda choice: (
|
||||
choice[0] != kwargs.get('dvla_org_id'),
|
||||
choice[0] != '001',
|
||||
choice[1],
|
||||
),
|
||||
))
|
||||
|
||||
dvla_org_id = RadioField(
|
||||
'Which logo should this service’s letter have?',
|
||||
validators=[
|
||||
DataRequired()
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class EmailFieldInWhitelist(EmailField, StripWhitespaceStringField):
|
||||
pass
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ from app.main.forms import (
|
||||
ConfirmPasswordForm,
|
||||
FreeSMSAllowance,
|
||||
InternationalSMSForm,
|
||||
LetterBranding,
|
||||
LinkOrganisationsForm,
|
||||
OrganisationTypeForm,
|
||||
RenameServiceForm,
|
||||
@@ -55,7 +54,6 @@ from app.main.forms import (
|
||||
from app.utils import (
|
||||
AgreementInfo,
|
||||
email_safe,
|
||||
get_logo_cdn_domain,
|
||||
user_has_permissions,
|
||||
user_is_gov_user,
|
||||
user_is_platform_admin,
|
||||
@@ -775,7 +773,6 @@ def service_set_email_branding(service_id):
|
||||
return render_template(
|
||||
'views/service-settings/set-email-branding.html',
|
||||
form=form,
|
||||
branding_dict=get_branding_as_dict(email_branding),
|
||||
search_form=SearchTemplatesForm(),
|
||||
show_search_box=(len(email_branding) > 6)
|
||||
)
|
||||
@@ -961,15 +958,6 @@ def get_branding_as_value_and_label(email_branding):
|
||||
]
|
||||
|
||||
|
||||
def get_branding_as_dict(email_branding):
|
||||
return {
|
||||
branding['id']: {
|
||||
'logo': 'https://{}/{}'.format(get_logo_cdn_domain(), branding['logo']),
|
||||
'colour': branding['colour']
|
||||
} for branding in email_branding
|
||||
}
|
||||
|
||||
|
||||
def convert_dictionary_to_wtforms_choices_format(dictionary, value, label):
|
||||
return [
|
||||
(item[value], item[label]) for item in dictionary
|
||||
|
||||
Reference in New Issue
Block a user