blob: 648ad4c359b402555329c2db6e3b884cca908516 (
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
|
{%extends "base.html"%}
{%from "dbupdate_hidden_fields.html" import hidden_fields%}
{%block title%}Select Dataset{%endblock%}
{%block css%}
<link rel="stylesheet" href="/static/css/two-column-with-separator.css" />
{%endblock%}
{%block contents%}
<h2 class="heading">{{filename}}: select study</h2>
<div class="row">
<form method="POST" action="{{url_for('dbinsert.select_dataset')}}"
id="select-platform-form" data-genechips="{{genechips_data}}"
class="two-col-sep-col1">
<legend class="heading">Select from existing study</legend>
{{hidden_fields(filename, filetype, species=species, genechipid=genechipid,
totallines=totallines)}}
<div class="form-group">
<label class="form-label" for="study">study:</label>
<select id="study" name="studyid" class="form-control">
{%for study in studies:%}
<option value="{{study['Id']}}">{{study["Name"]}}</option>
{%endfor%}
</select>
</div>
<button type="submit"
class="btn btn-primary"
{%if studies | length == 0:%}
disabled="disabled"
{%endif%} />submit selected study</button>
</form>
</div>
<div class="row">
<p class="two-col-sep-separator">OR</p>
</div>
<div class="row">
<form method="POST" action="{{url_for('dbinsert.create_study')}}"
id="select-platform-form" data-genechips="{{genechips_data}}"
class="two-col-sep-col2">
{%with messages = get_flashed_messages(with_categories=true)%}
{%if messages:%}
<ul>
{%for category, message in messages:%}
<li class="{{category}}">{{message}}</li>
{%endfor%}
</ul>
{%endif%}
{%endwith%}
<legend class="heading">Create new study</legend>
{{hidden_fields(filename, filetype, species=species, genechipid=genechipid,
totallines=totallines)}}
<div class="form-group">
<label class="form-label" for="studyname">name:</label>
<input type="text" id="studyname" name="studyname" class="form-control"
required="required"
{%if studyname:%}
value="{{studyname}}"
{%endif%} />
</div>
<div class="form-group">
<label class="form-label" for="group">group:</label>
<select id="group" name="inbredsetid" class="form-control"
required="required">
<option value="">Select group</option>
{%for family in groups:%}
<optgroup label="{{family}}">
{%for group in groups[family]:%}
<option value="{{group['InbredSetId']}}"
{%if group["InbredSetId"] == selected_group:%}
selected="selected"
{%endif%}>
{{group["FullName"]}}
</option>
{%endfor%}
</optgroup>
{%endfor%}
</select>
</div>
<div class="form-group">
<label class="form-label" for="tissue">tissue:</label>
<select id="tissue" name="tissueid" class="form-control"
required="required">
<option value="">Select type</option>
{%for tissue in tissues:%}
<option value="{{tissue['TissueId']}}"
{%if tissue["TissueId"] == selected_tissue:%}
selected="selected"
{%endif%}>
{{tissue["Name"]}}
</option>
{%endfor%}
</select>
</div>
<button type="submit" class="btn btn-primary">create study</button>
</form>
</div>
{%endblock%}
|