Skip to content

Commit 4af11e8

Browse files
committed
Pass along the variables in the search form if they are set
1 parent 9dd55af commit 4af11e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

readthedocs/templates/search/elastic_search.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<div class="navigable">
2828
<ul>
2929
<h5>{% trans 'Object Type' %}</h5>
30+
{# Hidden until we make the UX nicer here. #}
3031
{# <li class="{% if type == 'all' %}active{% endif %}"><a href="?{% url_replace request 'type' 'all' %}">{% trans 'All' %}</a></li> #}
3132
{% if not project %}
3233
<li class="{% if type == 'project' %}active{% endif %}"><a href="?{% url_replace request 'type' 'project' %}">{% trans 'Projects' %}</a></li>
@@ -142,9 +143,10 @@ <h2>{% trans 'Search' %}</h2>
142143
<input type="text" name="q" value="{{ query|default_if_none:"" }}" id="id_elastic_search">
143144
{% if type %} <input type="hidden" name="type" value="{{ type }}"> {% endif %}
144145
{% if project %} <input type="hidden" name="project" value="{{ project }}"> {% endif %}
145-
{% if taxonomy %} <input type="hidden" name="taxonomy" value="{{ taxonomy }}"> {% endif %}
146146
{% if version %} <input type="hidden" name="version" value="{{ version }}"> {% endif %}
147147
{% if language %} <input type="hidden" name="language" value="{{ language }}"> {% endif %}
148+
{% if doc_type %} <input type="hidden" name="doc_type" value="{{ doc_type }}"> {% endif %}
149+
{% if index %} <input type="hidden" name="index" value="{{ index }}"> {% endif %}
148150
</div>
149151
<div class="submit-input-wrapper">
150152
{% comment %}Translators: This is about starting a search{% endcomment %}

0 commit comments

Comments
 (0)