aboutsummaryrefslogtreecommitdiff
path: root/uploader/templates/rqtl2/select-population.html
blob: 37731f05efa2e057063f8a27b1e25875e7ad7824 (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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{%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 class="explainer">
  <p>The data is organised in a hierarchical form, beginning with
    <em>species</em> at the very top. Under <em>species</em> the data is
    organised by <em>population</em>, sometimes referred to as <em>grouping</em>.
    (In some really old documents/systems, you might see this referred to as
    <em>InbredSet</em>.)</p>
  <p>In this section, you get to define what population your data is to be
    organised by.</p>
</div>

<form method="POST"
      action="{{url_for('upload.rqtl2.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}}" />

  <div class="form-group">
    <label for="select:inbredset" class="form-label">population</label>
    <select id="select:inbredset"
	    name="inbredset_id"
	    required="required"
	    class="form-control">
      <option value="">Select a grouping/population</option>
      {%for pop in populations%}
      <option value="{{pop.InbredSetId}}">
	{{pop.InbredSetName}} ({{pop.FullName}})</option>
      {%endfor%}
    </select>
    <span class="form-text text-muted">If you are adding data to an already existing
      population, simply pick the population from this drop-down selector. If
      you cannot find your population from this list, try the form below to
      create a new one..</span>
  </div>

  <button type="submit" class="btn btn-primary" />select population</button>
</form>

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

<form method="POST"
      action="{{url_for('upload.rqtl2.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}}" />

  <div class="form-group">
    <legend class="heading">mandatory</legend>

    <div class="form-group">
      <label for="txt:inbredset-name" class="form-label">name</label>
      <input id="txt:inbredset-name"
	     name="inbredset_name"
	     type="text"
	     required="required"
	     maxlength="30"
	     placeholder="Enter grouping/population name"
	     class="form-control" />
      <span class="form-text text-muted">This is a short name that identifies the
        population. Useful for menus, and quick scanning.</span>
    </div>

    <div class="form-group">
      <label for="txt:" class="form-label">full name</label>
      <input id="txt:inbredset-fullname"
	     name="inbredset_fullname"
	     type="text"
	     required="required"
	     maxlength="100"
	     placeholder="Enter the grouping/population's full name"
	     class="form-control" />
      <span class="form-text text-muted">This can be the same as the name above, or can
        be longer. Useful for documentation, and human communication.</span>
    </div>
  </div>

  <div class="form-group">
    <legend class="heading">optional</legend>

    <div class="form-group">
      <label for="num:public" class="form-label">public?</label>
      <select id="num:public"
	      name="public"
	      class="form-control">
        <option value="0">0 - Only accessible to authorised users</option>
        <option value="1">1 - Publicly accessible to all users</option>
        <option value="2" selected>
	  2 - Publicly accessible to all users</option>
      </select>
      <span class="form-text text-muted">This determines whether the
        population/grouping will appear on the menus for users.</span>
    </div>

    <div class="form-group">
      <label for="txt:inbredset-family" class="form-label">family</label>
      <input id="txt:inbredset-family"
	     name="inbredset_family"
	     type="text"
	     placeholder="I am not sure what this is about."
	     class="form-control" />
      <span class="form-text text-muted">I do not currently know what this is about.
        This is a failure on my part to figure out what this is and provide a
        useful description. Please feel free to remind me.</span>
    </div>

    <div class="form-group">
    <label for="txtarea:" class="form-label">Description</label>
    <textarea id="txtarea:description"
	      name="description"
	      rows="5"
	      placeholder="Enter a description of this grouping/population"
	      class="form-control"></textarea>
    <span class="form-text text-muted">
      A long-form description of what the population consists of. Useful for
      humans.</span>
    </div>
  </div>

  <button type="submit" class="btn btn-primary" />
  create grouping/population</button>
</form>

{%endblock%}


{%block javascript%}
{%endblock%}