aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2021-08-12 23:28:08 +0000
committerzsloan2021-08-12 23:28:08 +0000
commit9ae4c8d0370137c3a698d57566305d815929d4ce (patch)
treecb3477396fc6da8426be897db24e4363951d92dd
parent88c9f4f9bd2adca23052fc3f5c5b965accf6722d (diff)
downloadgenenetwork2-9ae4c8d0370137c3a698d57566305d815929d4ce.tar.gz
Fixed issue where 1 was added to the loop.index instead of subtracted + only show the sample group selection if there are more than one sample groups
-rw-r--r--wqflask/wqflask/templates/show_trait_transform_and_filter.html4
1 files changed, 3 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/show_trait_transform_and_filter.html b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
index 56c3c30e..064fd3e5 100644
--- a/wqflask/wqflask/templates/show_trait_transform_and_filter.html
+++ b/wqflask/wqflask/templates/show_trait_transform_and_filter.html
@@ -50,9 +50,10 @@
<label for="filter_study_select">Filter samples by study: </label>
<select id="filter_study">
{% for study in study_samplelists %}
- <option value="{{ loop.index + 1 }}">{{ study }}</option>
+ <option value="{{ loop.index - 1 }}">{{ study }}</option>
{% endfor %}
</select>
+ {% if sample_groups|length != 1 %}
<select id="filter_study_group" size="1">
<option value="primary">
{{ sample_group_types['samples_primary'] }}
@@ -61,6 +62,7 @@
{{ sample_group_types['samples_other'] }}
</option>
</select>
+ {% endif %}
<input type="button" id="filter_by_study" class="btn btn-danger" value="Filter">
</div>
{% endif %}