mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 16:24:08 -04:00
Add live-search to /email-branding page
This commit is contained in:
@@ -4,6 +4,7 @@ from flask_login import login_required
|
|||||||
from app import email_branding_client
|
from app import email_branding_client
|
||||||
from app.main import main
|
from app.main import main
|
||||||
from app.main.forms import (
|
from app.main.forms import (
|
||||||
|
SearchTemplatesForm,
|
||||||
ServiceSelectEmailBranding,
|
ServiceSelectEmailBranding,
|
||||||
ServiceUpdateEmailBranding,
|
ServiceUpdateEmailBranding,
|
||||||
)
|
)
|
||||||
@@ -41,6 +42,8 @@ def email_branding():
|
|||||||
'views/email-branding/select-branding.html',
|
'views/email-branding/select-branding.html',
|
||||||
form=form,
|
form=form,
|
||||||
branding_dict=get_branding_as_dict(brandings),
|
branding_dict=get_branding_as_dict(brandings),
|
||||||
|
search_form=SearchTemplatesForm(),
|
||||||
|
show_search_box=len(brandings) > 9,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{% extends "views/platform-admin/_base_template.html" %}
|
{% extends "views/platform-admin/_base_template.html" %}
|
||||||
{% from "components/radios.html" import radios %}
|
{% from "components/radios.html" import radios %}
|
||||||
{% from "components/page-footer.html" import page_footer %}
|
{% from "components/page-footer.html" import page_footer %}
|
||||||
|
{% from "components/live-search.html" import live_search %}
|
||||||
|
|
||||||
{% block service_page_title %}
|
{% block service_page_title %}
|
||||||
Select email branding
|
Select email branding
|
||||||
@@ -15,6 +16,7 @@
|
|||||||
<div class="grid-row">
|
<div class="grid-row">
|
||||||
<div class="column-three-quarters">
|
<div class="column-three-quarters">
|
||||||
<form method="post">
|
<form method="post">
|
||||||
|
{{ live_search(target_selector='.multiple-choice', show=show_search_box, form=search_form) }}
|
||||||
{{ radios(form.email_branding) }}
|
{{ radios(form.email_branding) }}
|
||||||
{{ page_footer(
|
{{ page_footer(
|
||||||
'Next'
|
'Next'
|
||||||
|
|||||||
Reference in New Issue
Block a user