Merge pull request #2301 from alphagov/revert-2292-require-name-branding

Revert "Require name when adding email branding"
This commit is contained in:
Chris Hill-Scott
2018-09-07 11:52:30 +01:00
committed by GitHub
3 changed files with 5 additions and 14 deletions

View File

@@ -733,7 +733,7 @@ class GovernmentDomainField(StringField):
class ServiceUpdateEmailBranding(StripWhitespaceForm):
name = StringField('Name of brand', validators=[DataRequired()])
name = StringField('Name of brand')
text = StringField('Text')
domain = GovernmentDomainField('Domain')
colour = StringField(

View File

@@ -23,7 +23,7 @@
<div class="email-brand">
<div class="message-name">
<a href="{{ url_for('.update_email_branding', branding_id=brand.id) }}">
{{ brand.name }}
{{ brand.name or 'Unnamed' }}
</a>
</div>
{% if brand.domain_owner %}

View File

@@ -292,10 +292,7 @@ def test_deletes_previous_temp_logo_after_uploading_logo(
logged_in_platform_admin_client.post(
url_for('main.create_email_branding', logo=temp_old_filename, branding_id=fake_uuid),
data={
'file': (BytesIO(''.encode('utf-8')), 'test.png'),
'name': 'Test',
},
data={'file': (BytesIO(''.encode('utf-8')), 'test.png')},
content_type='multipart/form-data'
)
@@ -372,10 +369,7 @@ def test_temp_logo_is_shown_after_uploading_logo(
response = logged_in_platform_admin_client.post(
url_for('main.create_email_branding'),
data={
'file': (BytesIO(''.encode('utf-8')), 'test.png'),
'name': 'Test',
},
data={'file': (BytesIO(''.encode('utf-8')), 'test.png')},
content_type='multipart/form-data',
follow_redirects=True
)
@@ -405,10 +399,7 @@ def test_logo_persisted_when_organisation_saved(
resp = logged_in_platform_admin_client.post(
url_for('.create_email_branding', logo=temp_filename),
content_type='multipart/form-data',
data={
'name': 'Test',
}
content_type='multipart/form-data'
)
assert resp.status_code == 302