Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
6804003
WIP
rfultz Oct 12, 2021
5e2aa56
wip
rfultz Oct 19, 2021
c887e78
Merge branch 'develop' into feature/4906-replace-typeahead
rfultz Oct 20, 2021
1b942f9
Progress!
rfultz Nov 18, 2021
1246417
Update purgecss templates to include selected search suggestions
rfultz Dec 9, 2021
f5988a1
🎉
rfultz Dec 9, 2021
8b75b55
Revert typeahead.js file to develop
rfultz Dec 13, 2021
9af993a
Progress!
rfultz Dec 22, 2021
7826e38
Lean on autocomplete's highlight
rfultz Dec 23, 2021
c8ead44
Update style names
rfultz Jan 4, 2022
9f235fd
simple 'typeahead' => 'autosuggest'
rfultz Jan 4, 2022
04fe76f
Change tt- classnames to as-
rfultz Jan 4, 2022
276b7c1
'Typehead' => 'AutoSuggest'
rfultz Jan 4, 2022
c3533cd
Create AutoSuggest filters
rfultz Jan 4, 2022
2149c1b
Progress!
rfultz Jan 6, 2022
04dbb5a
add office names to external utilities file
rfultz Feb 9, 2022
d6d4f9c
Create utilities for slugify and stripping double quotes
rfultz Feb 9, 2022
063a725
Update purgecss for homepage search results
rfultz Feb 9, 2022
57b8b6b
Code formatting
rfultz Feb 9, 2022
14ecf50
Convert to autosuggest from typeahead
rfultz Feb 9, 2022
889d903
Remove Typeahead
rfultz Feb 9, 2022
02488a8
Remove temp code
rfultz Feb 9, 2022
7003444
Add AutoSuggest Filter and modernize code a bit
rfultz Feb 9, 2022
60e7c64
Progress check-in
rfultz Feb 9, 2022
f335618
Remove @trevoreyre/autocomplete
rfultz Mar 30, 2022
f00d72f
Comments
rfultz Mar 30, 2022
522a7b0
Update autosuggest.js
rfultz Mar 30, 2022
397abb1
Remove unused params in AutoSuggest()
rfultz Mar 30, 2022
e5594a0
Event > CustomEvent
rfultz Mar 30, 2022
7d0c57d
Add placeholder for AutoSuggest.highlightFirstResult()
rfultz Mar 30, 2022
562ce45
wip
rfultz Jul 18, 2022
121f3d2
WIP
rfultz Sep 22, 2022
6a178dc
Making JSdoc comments consistent
rfultz Sep 29, 2022
1927e6d
Making JSdoc comments consistent
rfultz Oct 1, 2022
4d921e6
Making JSdoc comments consistent
rfultz Oct 1, 2022
19bde52
Switch to data-search-type for autosuggest fields instead of opts
rfultz Oct 3, 2022
d03e65e
Removing logs
rfultz Oct 4, 2022
b24b1f0
Updating from false to False
rfultz Oct 5, 2022
a280c0e
Updating from false to False
rfultz Oct 5, 2022
d0145cf
Update autosuggest <input> element attributes
rfultz Oct 5, 2022
cb24332
Updating documentation
rfultz Oct 5, 2022
4ef1a84
Updating autosuggest-filter.jinja from 'name' to 'query_field_name'
rfultz Oct 5, 2022
083a0a7
Making 'js-contact-autosuggest' more universal
rfultz Oct 5, 2022
b9aac21
Removing console
rfultz Oct 5, 2022
41c326d
Add autosuggest feature flag
rfultz Oct 5, 2022
29a6141
Adjusting var/let/const scope
rfultz Oct 5, 2022
0de6369
Removing unused *
rfultz Oct 5, 2022
24a83ed
Changing scope
rfultz Oct 5, 2022
759f01c
Fixes
rfultz Oct 5, 2022
07fbcd8
Rename AutosuggestFilter to AutosuggestFilterBlock
rfultz Oct 5, 2022
9e97b5b
Formatting
rfultz Oct 5, 2022
aac3589
Documentation
rfultz Oct 5, 2022
125163a
Update events to handle opts from jQuery.Event and CustomEvent
rfultz Oct 5, 2022
96745a2
Cleanup
rfultz Oct 5, 2022
92f459b
Big chunk of progress
rfultz Oct 5, 2022
f6b8b84
Shouldn't have been deleted
rfultz Oct 5, 2022
e736d1c
Documentation
rfultz Oct 5, 2022
1502156
Working toward filterable results
rfultz Oct 5, 2022
f584296
Cleanup, passing linter
rfultz Oct 5, 2022
ac89347
Removing autosuggest test to pass deploy tests
rfultz Oct 5, 2022
006187b
Merge branch 'develop' into feature/5142-replace-typeahead-filter
rfultz Oct 5, 2022
70e333c
Overhauling how Autosuggest.getData works, now more adaptable
rfultz Oct 6, 2022
ef6d59d
Overhauling how Autosuggest.getData works, now more adaptable
rfultz Oct 6, 2022
fb1307d
Make Autosuggest.getSuggestions more adaptable
rfultz Oct 6, 2022
a85e387
Cleanup
rfultz Oct 6, 2022
64b102b
First step toward Autosuggest search refinement
rfultz Oct 6, 2022
5ffbd02
Remove this.url from Autosuggest
rfultz Oct 6, 2022
27406b4
Make Autosuggest dynamically filterable/refine-able
rfultz Oct 6, 2022
2a16faf
Change the search page's message when we found None
rfultz Oct 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
"navigator": true
},
"rules": {
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": ["error", "never", { "objectsInArrays": false }],
// "array-element-newline": ["error",
// {
// "multiline": true,
// "minItems": 2
// }
// ],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-dangle": ["error", "never"],
"eol-last": ["error", "always"],
// "eqeqeq": ["warn", "smart"],
Expand All @@ -36,8 +44,9 @@
"max-len": ["error", {
"code": 200,
"comments": 250,
"ignoreStrings": true,
// "ignoreStrings": true,
"ignoreTemplateLiterals": true
// "ignorePattern": false
}],
"no-console": "error",
"no-empty-function": "error",
Expand Down
12 changes: 9 additions & 3 deletions fec/data/templates/layouts/main.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@
DISTRICT_MAP_CUTOFF = '{{ constants.DISTRICT_MAP_CUTOFF }}';
WEBMANAGER_EMAIL = '{{ WEBMANAGER_EMAIL }}';
CANONICAL_BASE = '{{ CANONICAL_BASE }}';
TRANSITION_URL = '{{ TRANSITION_URL }}';
{% if TRANSITION_URL %}TRANSITION_URL = '{{ TRANSITION_URL }}';{% endif %}
{% if election_year %}ELECTION_YEAR = '{{ election_year }}';{% endif %}

useTt = {% if FEATURES.use_tt == False %}false{% else %}true{% endif %};
{# TODO: remove useTt with the use_tt feature flag #}

function trackMetric(name, imagesSelector) {
if (imagesSelector) {
var images = document.querySelectorAll(imagesSelector);
Expand Down Expand Up @@ -89,11 +92,14 @@
<div class="combo combo--search">
<input
class="js-site-search combo__input"
autocomplete="off"
id="query"
name="query"
type="text"
aria-label="Search FEC.gov">
data-search-type="all"
aria-autocomplete="list"
aria-label="Search FEC.gov"
{% if FEATURES.use_tt == False %}data-{% endif %}autocomplete="off"
>
<button type="submit" class="button--standard combo__button button--search">
<span class="u-visually-hidden">Search</span>
</button>
Expand Down
2 changes: 2 additions & 0 deletions fec/data/templates/layouts/widgets.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
DEFAULT_ELECTION_YEAR = '{{ DEFAULT_ELECTION_YEAR }}';{# see note #}
START_YEAR = '{{ START_YEAR }}';{# see note #}
END_YEAR = '{{ END_YEAR }}';{# see note #}
useTt = {% if FEATURES.use_tt == False %}false{% else %}true{% endif %};
{# TODO: remove useTt with the use_tt feature flag #}
{# note: these are set through fec/data/views.py and come from /data/constants.py #}

function trackMetric(name, imagesSelector) {
Expand Down
27 changes: 27 additions & 0 deletions fec/data/templates/macros/filters/autosuggest-filter.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{% macro field(query_field_name, field_label, instructions=False, dataset='committees', allow_text=False, id_suffix='', minor_label_text=False, helper_text=False) %}
<div
class="filter js-filter autosuggest-filter"
data-filter="autosuggest"
data-name="{{ query_field_name }}"
id="{{ query_field_name }}-field{{ id_suffix }}"
data-search-type="{{ dataset }}" {% if allow_text %}data-allow-text{% endif %}>
{% if minor_label_text %}
<label for="{{ query_field_name }}{{ id_suffix }}">{{ field_label }}</label>
{% else %}
<label class="label" for="{{ query_field_name }}{{ id_suffix }}">{{ field_label }}</label>
{% endif %}
{% if helper_text %}
<label class="label--help u-margin--top">{{ helper_text }}</label>
{% endif %}
<div class="combo combo--search--mini filter__autosuggest">
<ul class="dropdown__selected"></ul>
<input id="{{ query_field_name }}{{ id_suffix }}" type="text" class="combo__input" data-search-type="{{ dataset }}">
<button class="combo__button button--search button--standard" type="button">
<span class="u-visually-hidden">Search</span>
</button>
</div>
{% if instructions %}
<span class="filter__instructions">{{ instructions }}</span>
{% endif %}
</div>
{% endmacro %}
7 changes: 7 additions & 0 deletions fec/data/templates/macros/filters/committee-types.jinja
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}

{% macro field(
Expand Down Expand Up @@ -186,7 +187,13 @@
</fieldset>
{% if display_sponsor_candidate_filter %}
<div class="filter sub--filter--indent">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('sponsor_candidate_id', 'Leadership PAC sponsor', False, dataset='candidates', allow_text=False) }}
{% else %}
{{ typeahead.field('sponsor_candidate_id', 'Leadership PAC sponsor', False, dataset='candidates', allow_text=False) }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
</div>
{% endif %}
</div>
Expand Down
11 changes: 8 additions & 3 deletions fec/data/templates/macros/search.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
{% if location == 'hero' %}
{% set size = 'combo--search--medium' %}
{% endif %}
<form id="{{ location }}-search" action="/data/search" autocomplete="off" class="search__container">
<form
id="{{ location }}-search"
action="/data/search"
{% if FEATURES.use_tt == False %}data-{% endif %}autocomplete="off"
class="search__container"
>
<div class="combo combo--search {{ size }}">
<label for="search" class="label">Candidate or committee name or ID</label>
<input id="search" class="js-search-input combo__input" type="text" name="search"
autocorrect="off" autocapitalize="off" spellcheck="false"
<input id="search" class="js-search-input combo__input" type="text" name="search" data-search-type="{{ result_type }}"
{% if FEATURES.use_tt == False %}data-{% endif %}autocorrect="off" autocapitalize="off" spellcheck="false"
value="{{ query or '' }}">
<button type="submit" class="combo__button button--search {{ button_color }}">
<span class="u-visually-hidden">Search</span>
Expand Down
8 changes: 8 additions & 0 deletions fec/data/templates/partials/audit-filter.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'partials/filters.jinja' %}

{% import 'macros/filters/dropdown-json.jinja' as dropdown %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/years.jinja' as years %}

Expand Down Expand Up @@ -28,8 +29,15 @@
}}

{# committee/candidate name/id filter #}
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('q', 'Committee name or ID', '', dataset='auditCommittees', allow_text=True) }}
{{ autosuggest.field('qq', 'Authorized candidate name or ID', '', dataset='auditCandidates', allow_text=True) }}
{% else %}
{{ typeahead.field('q', 'Committee name or ID', '', dataset='auditCommittees', allow_text=True) }}
{{ typeahead.field('qq', 'Authorized candidate name or ID', '', dataset='auditCandidates', allow_text=True) }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}

{# election cycle range filter #}
{{ years.cycleRange('cycle', 'Election cycles covered by audit' ) }}
Expand Down
8 changes: 8 additions & 0 deletions fec/data/templates/partials/candidates-filter.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
{% import 'macros/filters/parties.jinja' as parties %}
{% import 'macros/filters/states.jinja' as states %}
{% import 'macros/filters/districts.jinja' as districts %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/years.jinja' as years %}
{% import 'macros/filters/date.jinja' as date %}

{% block filters %}
<div class="filters__inner">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('q', 'Candidate name or ID', '', dataset='candidates', allow_text=True) }}
{% else %}
{{ typeahead.field('q', 'Candidate name or ID', '', dataset='candidates', allow_text=True) }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}

{{ years.years('election_year', 'Election year', end_year=constants.END_YEAR + 4) }}
{{ office.checkbox() }}
{{ parties.checkbox() }}
Expand Down
9 changes: 8 additions & 1 deletion fec/data/templates/partials/candidates-office-filter.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
{% import 'macros/filters/parties.jinja' as parties %}
{% import 'macros/filters/states.jinja' as states %}
{% import 'macros/filters/districts.jinja' as districts %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/election-filter.jinja' as election_filter %}
{% import 'macros/filters/range.jinja' as range_filter %}
Expand All @@ -13,7 +14,13 @@
{% block filters %}
<div class="js-accordion accordion--neutral" data-content-prefix="filter" data-open-first="false">
<div class="filters__inner">
{{ typeahead.field('q', 'Candidate name or ID', '', dataset='candidates', allow_text=True) }}
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('q', 'Candidate name or ID', '', dataset='candidates', allow_text=True) }}
{% else %}
{{ typeahead.field('q', 'Candidate name or ID', '', dataset='candidates', allow_text=True) }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ election_filter.full_cycle('election_year', 'Election year', 'cycle', 'election_full', table_context['office']) }}
</div>
<button type="button" class="js-accordion-trigger accordion__button">Candidate information</button>
Expand Down
9 changes: 8 additions & 1 deletion fec/data/templates/partials/committees-filter.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
{% import 'macros/filters/text.jinja' as text %}
{% import 'macros/filters/parties.jinja' as parties %}
{% import 'macros/filters/states.jinja' as states %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/years.jinja' as years %}
{% import 'macros/filters/date.jinja' as date %}

{% block filters %}
<div class="js-accordion accordion--neutral" data-content-prefix="filter" data-open-first="false">
<div class="filters__inner">
{{ typeahead.field('q', 'Committee name or ID', False, dataset='committees', allow_text=True) }}
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('q', 'Committee name or ID', False, dataset='committees', allow_text=True) }}
{% else %}
{{ typeahead.field('q', 'Committee name or ID', False, dataset='committees', allow_text=True) }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ years.cycles('cycle', 'Years active', show_tooltip=False) }}
</div>
<button type="button" class="js-accordion-trigger accordion__button">Committee details</button>
Expand Down
17 changes: 15 additions & 2 deletions fec/data/templates/partials/communication-costs-filter.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'partials/filters.jinja' %}

{% import 'macros/filters/text.jinja' as text %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/states.jinja' as states %}
{% import 'macros/filters/date.jinja' as date %}
Expand All @@ -16,11 +17,23 @@ Filter communication costs

<div class="js-accordion accordion--neutral" data-content-prefix="filter" data-open-first="false">
<div class="filters__inner">
{{ typeahead.field('committee_id', 'Spender name or ID') }}
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('committee_id', 'Spender name or ID') }}
{% else %}
{{ typeahead.field('committee_id', 'Spender name or ID') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
</div>
<button type="button" class="js-accordion-trigger accordion__button">Candidate mentioned</button>
<div class="accordion__content">
{{ typeahead.field('candidate_id', 'Candidate name or ID', dataset='candidates') }}
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('candidate_id', 'Candidate name or ID', dataset='candidates') }}
{% else %}
{{ typeahead.field('candidate_id', 'Candidate name or ID', dataset='candidates') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ support_oppose.checkbox('_processed') }}
</div>
<button type="button" class="js-accordion-trigger accordion__button">Transaction information</button>
Expand Down
7 changes: 7 additions & 0 deletions fec/data/templates/partials/debts-filter.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
{% import 'macros/filters/date.jinja' as date %}
{% import 'macros/filters/range.jinja' as range %}
{% import 'macros/filters/text.jinja' as text %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}

{% block filters %}
<div class="filters__inner">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('committee_id', 'Committee Name or ID') }}
{% else %}
{{ typeahead.field('committee_id', 'Committee Name or ID') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ text.field('creditor_debtor_name', 'Creditor/debtor Name') }}
{# removing date filter for now, waiting for determination of its usefulness #}
{# {{ date.field('date', 'Date') }} #}
Expand Down
14 changes: 14 additions & 0 deletions fec/data/templates/partials/disbursements-filter.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'partials/filters.jinja' %}

{% import 'macros/filters/text.jinja' as text %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/states.jinja' as states %}
{% import 'macros/filters/date.jinja' as date %}
Expand All @@ -18,15 +19,28 @@ Filter disbursements

{% block efiling_filters %}
<div class="filters__inner">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('committee_id', 'Spender name or ID', id_suffix='_raw') }}
{% else %}
{{ typeahead.field('committee_id', 'Spender name or ID', id_suffix='_raw') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ text.field('disbursement_description', 'Description', id_suffix='_raw') }}
</div>
{% endblock %}

{% block filters %}
<div class="filters__inner">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('committee_id', 'Spender name or ID', helper_text = 'Limit 10 spender names or IDs') }}
{{ autosuggest.field('recipient_name', 'Recipient name or ID', allow_text=True, helper_text = 'Limit 10 recipient names or IDs') }}
{% else %}
{{ typeahead.field('committee_id', 'Spender name or ID', helper_text = 'Limit 10 spender names or IDs') }}
{{ typeahead.field('recipient_name', 'Recipient name or ID', allow_text=True, helper_text = 'Limit 10 recipient names or IDs') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ years.cycles('two_year_transaction_period', 'Report time period', show_tooltip=True) }}
{{ date.field('date', 'Disbursement date range' ) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'partials/filters.jinja' %}

{% import 'macros/filters/text.jinja' as text %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/states.jinja' as states %}
{% import 'macros/filters/date.jinja' as date %}
Expand All @@ -14,8 +15,15 @@ Filter independent expenditures
{% block filters %}
<div class="js-accordion accordion--neutral" data-content-prefix="filter" data-open-first="false">
<div class="filters__inner">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('committee_id', 'Spender name or ID') }}
{{ autosuggest.field('candidate_id', 'Candidate mentioned', dataset='candidates') }}
{% else %}
{{ typeahead.field('committee_id', 'Spender name or ID') }}
{{ typeahead.field('candidate_id', 'Candidate mentioned', dataset='candidates') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
</div>
<button type="button" class="js-accordion-trigger accordion__button">Transaction information</button>
<div class="accordion__content">
Expand Down
19 changes: 17 additions & 2 deletions fec/data/templates/partials/filings-filter.jinja
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% extends 'partials/filters.jinja' %}

{% import 'macros/filters/text.jinja' as text %}
{% import 'macros/filters/autosuggest-filter.jinja' as autosuggest %}
{% import 'macros/filters/typeahead-filter.jinja' as typeahead %}
{% import 'macros/filters/version-status.jinja' as version_status %}
{% import 'macros/filters/states.jinja' as states %}
Expand All @@ -20,7 +21,13 @@ Filter reports

{% block efiling_filters %}
<div class="filters__inner">
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('q_filer', 'Committee name or ID', '', id_suffix='_raw') }}
{% else %}
{{ typeahead.field('q_filer', 'Committee name or ID', id_suffix='_raw', allow_text=True ) }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}
{{ date.field('receipt_date', 'Receipt date', id_suffix='_raw') }}
</div>
{% endblock %}
Expand All @@ -29,9 +36,17 @@ Filter reports
<div class="js-accordion accordion--neutral" data-content-prefix="filter" data-open-first="true">
<button type="button" class="js-accordion-trigger accordion__button">Filer</button>
<div class="accordion__content">
{{ states.field('state') }}
{# TODO - Autosuggest #}
{% if (FEATURES.use_tt) == false %}
{{ autosuggest.field('q_filer', 'Committee name or ID', '', allow_text=True) }}
{{ autosuggest.field('candidate_id', 'Candidate name or ID', '', dataset='candidates') }}
{% else %}
{{ typeahead.field('q_filer', 'Committee name or ID', '', allow_text=True) }}
{{ typeahead.field('candidate_id', 'Candidate name or ID', '', dataset='candidates') }}
{% endif %}
{# TODO: remove useTt with the use_tt feature flag #}

{{ typeahead.field('q_filer', 'Committee name or ID', '', allow_text=True) }}
{{ typeahead.field('candidate_id', 'Candidate name or ID', '', dataset='candidates') }}
{{ states.field('state', type='Candidate') }}
{{ office.checkbox() }}
{{ parties.checkbox() }}
Expand Down
Loading