-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use templatetag to help displaying search options in template
- Loading branch information
Showing
7 changed files
with
90 additions
and
84 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
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 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% if widget == 'checkbox' %} | ||
<label for="id_{{ option_name }}" class="between w-100 cursor-pointer {% if option.disabled %}opacity-020{% endif %}"> | ||
<div class="bw-search__filter-checkbox"> | ||
<input id="id_{{ option_name }}" name="{{ option.query_param_name }}" type="checkbox" class="bw-checkbox" {% if option.value %}checked{% endif %} {% if option.disabled %}disabled{% endif %}/> | ||
</div> | ||
<div class="bw-search__filter-name">{{ label }}</div> | ||
</label> | ||
{% elif widget == 'text' %} | ||
<label for="id_{{ option_name }}" class="{% if option.disabled %}opacity-020{% endif %}">{{ label }}</label>: | ||
<input id="id_{{ option_name }}" name="{{ option.query_param_name }}" class="bw-search_input" type="text" value="{{ option.value_formatted }}" {% if option.disabled %}disabled{% endif %}/> | ||
{% elif widget == 'select' %} | ||
<span class="font-weight-normal text-light-grey d-none d-md-inline">{{ label }}:</span> | ||
<select id="id_{{ option_name }}" name="{{ option.query_param_name }}" {% if option.disabled %}disabled{% endif %}> | ||
{% for choice in option.get_choices_annotated_with_selection %} | ||
<option value="{{choice.0}}"{% if choice.2 %}selected="selected"{% endif %}>{{choice.1}}</option> | ||
{% endfor %} | ||
</select> | ||
{% elif widget == 'hidden' %} | ||
<input type="hidden" name="{{ option.query_param_name }}" value="{{ option.value_formatted }}" /> | ||
{% endif %} |
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