diff --git a/app/main/forms.py b/app/main/forms.py index fbc856b3b..b8d769a4a 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -713,20 +713,6 @@ class ServicePreviewBranding(StripWhitespaceForm): branding_style = HiddenField('branding_style') -class ServiceSelectEmailBranding(StripWhitespaceForm): - - def __init__(self, email_brandings=[], *args, **kwargs): - self.email_branding.choices = email_brandings - super(ServiceSelectEmailBranding, self).__init__(*args, **kwargs) - - email_branding = RadioField( - 'Email branding', - validators=[ - DataRequired() - ] - ) - - class ServiceUpdateEmailBranding(StripWhitespaceForm): name = StringField('Name of brand') diff --git a/app/main/views/email_branding.py b/app/main/views/email_branding.py index c6a3611d2..819a61ac7 100644 --- a/app/main/views/email_branding.py +++ b/app/main/views/email_branding.py @@ -3,11 +3,7 @@ from flask_login import login_required from app import email_branding_client from app.main import main -from app.main.forms import ( - SearchTemplatesForm, - ServiceSelectEmailBranding, - ServiceUpdateEmailBranding, -) +from app.main.forms import SearchTemplatesForm, ServiceUpdateEmailBranding from app.main.s3_client import ( TEMP_TAG, delete_temp_file, @@ -25,16 +21,9 @@ from app.utils import get_cdn_domain, user_is_platform_admin def email_branding(): brandings = email_branding_client.get_all_email_branding(sort_key='name') - form = ServiceSelectEmailBranding() - email_brandings = get_branding_as_value_and_label(brandings) - form.email_branding.choices = email_brandings - - if form.validate_on_submit(): - return redirect(url_for('.update_email_branding', branding_id=form.email_branding.data)) - return render_template( 'views/email-branding/select-branding.html', - form=form, + email_brandings=get_branding_as_value_and_label(brandings), search_form=SearchTemplatesForm(), show_search_box=len(brandings) > 9, ) diff --git a/app/templates/views/email-branding/select-branding.html b/app/templates/views/email-branding/select-branding.html index 16324b893..6fa134f57 100644 --- a/app/templates/views/email-branding/select-branding.html +++ b/app/templates/views/email-branding/select-branding.html @@ -17,16 +17,15 @@ Add new brand -