aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/samples/select-population.html
blob: 4bb4cc129cb62c5646819d37c0d115ed29980ad9 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
{%extends "base.html"%}
{%from "flash_messages.html" import flash_messages%}

{%block title%}Select Grouping/Population{%endblock%}

{%block contents%}
<h1 class="heading">Select grouping/population</h1>

<div>
  <p>We organise the samples/cases/strains in a hierarchichal form, starting
    with <strong>species</strong> at the very top. Under species, we have a
    grouping in terms of the relevant population
    (e.g. Inbred populations, cell tissue, etc.)</p>
</div>

<hr />

<form method="POST" action="{{url_for('samples.select_population',
                            species_id=species.SpeciesId)}}">
  <legend class="heading">select grouping/population</legend>
  {{flash_messages("error-select-population")}}

  <input type="hidden" name="species_id" value="{{species.SpeciesId}}" />
  <fieldset>
    <label for="select:inbredset" class="form-col-1">grouping/population</label>
    <select id="select:inbredset"
	    name="inbredset_id"
	    required="required"
	    class="form-col-2">
      <option value="">Select a grouping/population</option>
      {%for pop in populations%}
      <option value="{{pop.InbredSetId}}">
	{{pop.InbredSetName}} ({{pop.FullName}})</option>
      {%endfor%}
    </select>
  </fieldset>

  <fieldset>
    <input type="submit"
	   value="select population"
	   class="btn btn-main form-col-2" />
  </fieldset>
</form>

<p style="color:#FE3535; padding-left:20em; font-weight:bolder;">OR</p>

<form method="POST" action="{{url_for('samples.create_population',
                            species_id=species.SpeciesId)}}">
  <legend class="heading">create new grouping/population</legend>
  {{flash_messages("error-create-population")}}

  <input type="hidden" name="species_id" value="{{species.SpeciesId}}" />
  <fieldset>
    <legend>mandatory</legend>
    <label for="txt:inbredset-name" class="form-col-1">name</label>
    <input id="txt:inbredset-name"
	   name="inbredset_name"
	   type="text"
	   required="required"
	   placeholder="Enter grouping/population name"
	   class="form-col-2" />

    <label for="txt:" class="form-col-1">full name</label>
    <input id="txt:inbredset-fullname"
	   name="inbredset_fullname"
	   type="text"
	   required = "required"
	   placeholder="Enter the grouping/population's full name"
	   class="form-col-2" />
  </fieldset>
  <fieldset>
    <legend>Optional</legend>

    <label for="num:public" class="form-col-1">public?</label>
    <input id="num:public"
	   name="public"
	   type="number"
	   min="0" max="2" value="2"
	   class="form-col-2" />

    <label for="txt:inbredset-family" class="form-col-1">family</label>
    <input id="txt:inbredset-family"
	   name="inbredset_family"
	   type="text"
	   placeholder="I am not sure what this is about."
	   class="form-col-2" />

    <label for="txtarea:" class="form-col-1">Description</label>
    <textarea id="txtarea:description"
	      name="description"
	      rows="5"
	      placeholder="Enter a description of this grouping/population"
	      class="form-col-2"></textarea>
  </fieldset>

  <fieldset>
    <input type="submit"
	   value="create grouping/population"
	   class="btn btn-main form-col-2" />
  </fieldset>
</form>

{%endblock%}


{%block javascript%}
{%endblock%}