mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 08:44:23 -04:00
Merge pull request #2260 from alphagov/remove-govuk-from-brand-type
Remove GOV.UK as option when creating a branding
This commit is contained in:
@@ -727,7 +727,6 @@ class ServiceUpdateEmailBranding(StripWhitespaceForm):
|
|||||||
brand_type = RadioField(
|
brand_type = RadioField(
|
||||||
"Brand type",
|
"Brand type",
|
||||||
choices=[
|
choices=[
|
||||||
('govuk', 'GOV.UK only'),
|
|
||||||
('both', 'GOV.UK and branding'),
|
('both', 'GOV.UK and branding'),
|
||||||
('org', 'Branding only'),
|
('org', 'Branding only'),
|
||||||
('org_banner', 'Branding banner'),
|
('org_banner', 'Branding banner'),
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ def update_email_branding(branding_id, logo=None):
|
|||||||
@login_required
|
@login_required
|
||||||
@user_is_platform_admin
|
@user_is_platform_admin
|
||||||
def create_email_branding(logo=None):
|
def create_email_branding(logo=None):
|
||||||
form = ServiceUpdateEmailBranding(brand_type='govuk')
|
form = ServiceUpdateEmailBranding(brand_type='org')
|
||||||
|
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
if form.file.data:
|
if form.file.data:
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ def test_create_new_email_branding_without_logo(
|
|||||||
'text': 'new text',
|
'text': 'new text',
|
||||||
'name': 'new name',
|
'name': 'new name',
|
||||||
'domain': 'sample.com',
|
'domain': 'sample.com',
|
||||||
'brand_type': 'govuk'
|
'brand_type': 'org'
|
||||||
}
|
}
|
||||||
|
|
||||||
mock_persist = mocker.patch('app.main.views.email_branding.persist_logo')
|
mock_persist = mocker.patch('app.main.views.email_branding.persist_logo')
|
||||||
@@ -131,7 +131,7 @@ def test_create_new_email_branding_when_branding_saved(
|
|||||||
'text': 'new text',
|
'text': 'new text',
|
||||||
'name': 'new name',
|
'name': 'new name',
|
||||||
'domain': 'sample.com',
|
'domain': 'sample.com',
|
||||||
'brand_type': 'govuk'
|
'brand_type': 'org_banner'
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_filename = LOGO_LOCATION_STRUCTURE.format(
|
temp_filename = LOGO_LOCATION_STRUCTURE.format(
|
||||||
@@ -230,7 +230,7 @@ def test_update_existing_branding(
|
|||||||
'text': 'new text',
|
'text': 'new text',
|
||||||
'name': 'new name',
|
'name': 'new name',
|
||||||
'domain': 'sample.com',
|
'domain': 'sample.com',
|
||||||
'brand_type': 'govuk'
|
'brand_type': 'both'
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_filename = LOGO_LOCATION_STRUCTURE.format(
|
temp_filename = LOGO_LOCATION_STRUCTURE.format(
|
||||||
@@ -342,7 +342,7 @@ def test_colour_regex_validation(
|
|||||||
'text': 'new text',
|
'text': 'new text',
|
||||||
'name': 'new name',
|
'name': 'new name',
|
||||||
'domain': 'sample.com',
|
'domain': 'sample.com',
|
||||||
'brand_type': 'govuk'
|
'brand_type': 'org'
|
||||||
}
|
}
|
||||||
|
|
||||||
mocker.patch('app.main.views.email_branding.delete_temp_files_created_by')
|
mocker.patch('app.main.views.email_branding.delete_temp_files_created_by')
|
||||||
|
|||||||
Reference in New Issue
Block a user