diff options
author | Frederick Muriuki Muriithi | 2024-09-09 14:06:31 -0500 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2024-09-09 16:41:46 -0500 |
commit | 9cd33ddac3d6848c5443962d66494635feadef51 (patch) | |
tree | 385a559380f4d6a961fefb38ad410ad9ca27b052 /uploader/templates/populations/macro-select-population.html | |
parent | 707c715d1e336ee45bdcced031881ed603b9297a (diff) | |
download | gn-uploader-9cd33ddac3d6848c5443962d66494635feadef51.tar.gz |
Initialise samples uploads
* Move existing code to new module
* Rework the UI: create new templates
* Rework the routes: Select species and populations before attempting
an upload.
Diffstat (limited to 'uploader/templates/populations/macro-select-population.html')
-rw-r--r-- | uploader/templates/populations/macro-select-population.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/uploader/templates/populations/macro-select-population.html b/uploader/templates/populations/macro-select-population.html new file mode 100644 index 0000000..af4fd3a --- /dev/null +++ b/uploader/templates/populations/macro-select-population.html @@ -0,0 +1,30 @@ +{%macro select_population_form(form_action, populations)%} +<form method="GET" action="{{form_action}}"> + <legend>Select Population</legend> + + <div class="form-group"> + <label for="select-population" class="form-label">Select Population</label> + <select id="select-population" + name="population_id" + class="form-control" + required="required"> + <option value="">Select Population</option> + {%for family in populations%} + <optgroup {%if family[0][1] is not none%} + label="{{family[0][1]}}" + {%else%} + label="Undefined" + {%endif%}> + {%for population in family[1]%} + <option value="{{population.Id}}">{{population.FullName}}</option> + {%endfor%} + </optgroup> + {%endfor%} + </select> + </div> + + <div class="form-group"> + <input type="submit" value="Select" class="btn btn-primary" /> + </div> +</form> +{%endmacro%} |