-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8401 from cfpb/ans_search_input
Add `o-search-input` component
- Loading branch information
Showing
32 changed files
with
518 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-05-08 18:25-0400\n" | ||
"POT-Creation-Date: 2024-05-10 14:37-0400\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -18,25 +18,19 @@ msgstr "" | |
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:44 | ||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:45 | ||
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:87 | ||
msgid "/ask-cfpb/search/" | ||
msgstr "/es/obtener-respuestas/buscar/" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:47 | ||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:63 | ||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:49 | ||
msgid "Search for your question" | ||
msgstr "Busque su pregunta" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:93 | ||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:55 | ||
msgid "Search Ask CFPB for your question" | ||
msgstr "Busque 'Obtener Respuestas' para su cuestionamiento" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/_ask-search.html:94 | ||
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:59 | ||
msgid "Search" | ||
msgstr "Buscar" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/answer-page.html:7 | ||
msgid "Consumer Financial Protection Bureau" | ||
msgstr "" | ||
|
@@ -101,7 +95,7 @@ msgstr "No se encontraron resultados para" | |
msgid "Please enter a search term in the box above." | ||
msgstr "Por favor escriba su búsqueda arriba" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/landing-page.html:6 | ||
#: ask_cfpb/jinja2/ask-cfpb/landing-page.html:5 | ||
msgid "Read answer" | ||
msgstr "Leer la respuesta" | ||
|
||
|
@@ -117,6 +111,10 @@ msgstr "Búsqueda especial" | |
msgid "Search term" | ||
msgstr "Palabra a buscar" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:59 | ||
msgid "Search" | ||
msgstr "Buscar" | ||
|
||
#: ask_cfpb/jinja2/ask-cfpb/see-all.html:63 | ||
msgid "Clear search" | ||
msgstr "Borrar búsqueda" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-03-29 11:30-0400\n" | ||
"POT-Creation-Date: 2024-05-10 14:37-0400\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -18,39 +18,39 @@ msgstr "" | |
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
#: cfgov/settings/base.py:233 | ||
#: cfgov/settings/base.py:232 | ||
msgid "English" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:234 | ||
#: cfgov/settings/base.py:233 | ||
msgid "Spanish" | ||
msgstr "Español" | ||
|
||
#: cfgov/settings/base.py:235 | ||
#: cfgov/settings/base.py:234 | ||
msgid "Chinese" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:236 | ||
#: cfgov/settings/base.py:235 | ||
msgid "Vietnamese" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:237 | ||
#: cfgov/settings/base.py:236 | ||
msgid "Korean" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:238 | ||
#: cfgov/settings/base.py:237 | ||
msgid "Tagalog" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:239 | ||
#: cfgov/settings/base.py:238 | ||
msgid "Russian" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:240 | ||
#: cfgov/settings/base.py:239 | ||
msgid "Arabic" | ||
msgstr "" | ||
|
||
#: cfgov/settings/base.py:241 | ||
#: cfgov/settings/base.py:240 | ||
msgid "Haitian Creole" | ||
msgstr "" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 20 additions & 22 deletions
42
cfgov/regulations3k/jinja2/regulations3k/regulations3k-search-bar.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,30 @@ | ||
{% macro render(hidden_fields, q='') %} | ||
|
||
<form action="." data-js-hook="behavior_submit-search"> | ||
<form action="." | ||
data-js-hook="behavior_submit-search" | ||
data-cy="regs-search-form"> | ||
<h2 class="h4"> | ||
Search term | ||
</h2> | ||
<div class="o-form--input-w-btn"> | ||
{% if hidden_fields | length > 0 %} | ||
<div id="regs3k-hidden-filters"> | ||
{% for field in hidden_fields %} | ||
{% for value in field.value.split(',') %} | ||
<input type="hidden" name="{{ field.name }}" value="{{ value }}"> | ||
{% endfor %} | ||
{% if hidden_fields | length > 0 %} | ||
<div id="regs3k-hidden-filters"> | ||
{% for field in hidden_fields %} | ||
{% for value in field.value.split(',') %} | ||
<input type="hidden" name="{{ field.name }}" value="{{ value }}"> | ||
{% endfor %} | ||
</div> | ||
{% endif %} | ||
<div class="o-form--input-w-btn__input-container"> | ||
<div class="m-btn-inside-input input-contains-label"> | ||
<label for="query" class="input-contains-label__before input-contains-label__before--search"> | ||
{{ svg_icon('search') }} | ||
<span class="u-visually-hidden">Search</span> | ||
</label> | ||
<input id="query" name="q" type="text" title="Search terms" class="a-text-input" value="{{ q }}" placeholder="Search terms"> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
<div class="o-form--input-w-btn__btn-container"> | ||
<button class="a-btn" aria-label="Search for a term in the regulations">Search</button> | ||
</div> | ||
</div> | ||
{% endif %} | ||
|
||
{% import 'v1/includes/organisms/search-input.html' as search_input %} | ||
{{ search_input.render({ | ||
"input_id": "query", | ||
"input_name": "q", | ||
"input_value": q, | ||
"input_aria_label": "Search for a term", | ||
"placeholder": "Enter your search term", | ||
"submit_aria_label": "Search for a term in the regulations" | ||
}) }} | ||
</form> | ||
|
||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.