aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2025-07-08 16:05:40 -0500
committerFrederick Muriuki Muriithi2025-07-08 16:05:40 -0500
commit3f658b0af6d3cf84a686c8d7eb948929520e6323 (patch)
tree021c05b42c551417e117b4965ce64813b4d50781 /uploader/templates
parent7316e4a3bacaa1c4984fb2068fac1de9f839edf4 (diff)
downloadgn-uploader-3f658b0af6d3cf84a686c8d7eb948929520e6323.tar.gz
Fix entry/selection of population families.HEADmain
Populations can be grouped into families for presentation in the menus. They can also be left ungrouped. These "families" are general categories of data, whose only effect is to present the selection of the populations from the menus in a more organised form. The families can also differ from species to species, though there are some very general categories that span multiple (all?) species. This commit takes all the above into consideration, relaxing the entry constraints and making entry of the families a lot more flexible.
Diffstat (limited to 'uploader/templates')
-rw-r--r--uploader/templates/populations/create-population.html39
1 files changed, 25 insertions, 14 deletions
diff --git a/uploader/templates/populations/create-population.html b/uploader/templates/populations/create-population.html
index c0c4f45..007b6bf 100644
--- a/uploader/templates/populations/create-population.html
+++ b/uploader/templates/populations/create-population.html
@@ -154,24 +154,35 @@
{%else%}
class="form-group"
{%endif%}>
- <label for="select-population-family" class="form-label">Family</label>
- <select id="select-population-family"
- name="population_family"
- class="form-control"
- required="required">
- <option value="">Please select a family</option>
+ <label for="txt-population-family" class="form-label">Family</label>
+ <input type="text"
+ id="txt-population-family"
+ name="population_family"
+ class="form-control"
+ list="families-list" />
+ <datalist id="families-list">
{%for family in families%}
- <option value="{{family}}"
- {%if error_values.population_family == family%}
- selected="selected"
- {%endif%}>{{family}}</option>
+ <option value="{{family}}">{{family}}</option>
{%endfor%}
- </select>
+ </datalist>
<small class="form-text text-muted">
<p>
- This is a rough grouping of the populations in GeneNetwork into lists
- of common types of populations.
- </p>
+ This is <strong>optional</strong> metadata. It is used to group
+ populations into "families" for presentation in the menus.
+ {%if families | length > 0%}
+ Examples of currently existing families are:
+ <ul>
+ {%for family in families[0:7]%}
+ <li>{{family}}</li>
+ {%endfor%}
+ <li>etc.</li>
+ </ul>
+ {%endif%}
+
+ You can
+ {%if families|length>0%} select from existing families, or {%endif%}
+ create a new family by typing in the input box above. You can also
+ leave the family blank.</p>
</small>
</div>