aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/populations/macro-select-population.html
blob: af4fd3ad76a9c697fe3eb4dcdd4e2817314e632f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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%}