aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/populations/macro-select-population.html
blob: 14b0510628248b8d2846f807f49b4c6f279ea8a5 (about) (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{%from "macro-step-indicator.html" import step_indicator%}

{%macro select_population_form(form_action, species, populations)%}
<form method="GET" action="{{form_action}}" class="form-horizontal">

  <h2>{{step_indicator("2")}} What population do you want to work with?</h2>

  {%if populations | length != 0%}

  <p class="form-text">Search for, and select the population from the table
    below and click "Continue"</p>

  <div class="radio">
    <label class="control-label" for="rdo-cant-find-population">
      <input type="radio" id="rdo-cant-find-population"
             name="population_id" value="CREATE-POPULATION" />
      I cannot find the population I want &mdash; create it!
    </label>
  </div>

  <div class="col-sm-offset-10 col-sm-2">
    <input type="submit" value="continue" class="btn btn-primary" />
  </div>

  <div style="margin-top:3em;">
    <table id="tbl-select-population" class="table compact stripe"
           data-populations-list='{{populations | tojson}}'>
      <thead>
        <tr>
          <th></th>
          <th>Population</th>
        </tr>
      </thead>

      <tbody></tbody>
    </table>
  </div>

  {%else%}
  <p class="form-text">
    There are no populations currently defined for {{species['FullName']}}
    ({{species['SpeciesName']}}).<br />
    Click "Continue" to create the first!</p>
  <input type="hidden" name="population_id" value="CREATE-POPULATION" />

  <div class="col-sm-offset-10 col-sm-2">
    <input type="submit" value="continue" class="btn btn-primary" />
  </div>
  {%endif%}

</form>
{%endmacro%}