about summary refs log tree commit diff
path: root/uploader/templates/populations/macro-select-population.html
diff options
context:
space:
mode:
Diffstat (limited to 'uploader/templates/populations/macro-select-population.html')
-rw-r--r--uploader/templates/populations/macro-select-population.html30
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%}