Skip to content

Commit

Permalink
[CDH-50] Apply default search filter to html version of form
Browse files Browse the repository at this point in the history
  • Loading branch information
liamjohnston committed Jul 15, 2024
1 parent f565268 commit 3cd61a4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/includes/search_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@
{% for filter_option in site_search.filter_choices %}
<div class="radio">
<div class="search-form__radio">
<input type="radio" name="filter" value="{{ filter_option.value }}" id="{{ uniqueID }}_{{ filter_option.value }}" {% if form.filter.value == filter_option.value %}checked{% endif %}/>
<input type="radio"
name="filter"
value="{{ filter_option.value }}"
id="{{ uniqueID }}_{{ filter_option.value }}"
{% if form.filter.value == filter_option.value %}checked{% endif %}
{% if filter_option.value == 'everything' and not form.filter.value %}checked{% endif %}
/>
<label for="{{ uniqueID }}_{{ filter_option.value }}">{{ filter_option.label }}</label>
{% include 'includes/svg.html' with sprite="two-tone" svg=filter_option.icon %}
</div>
Expand Down

0 comments on commit 3cd61a4

Please sign in to comment.