mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
Select a branding with a link, not form
Selecting a branding just takes you to a new page, it doesn’t change any state. Links are generally the way you go from one page to another on the web.
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user