aboutsummaryrefslogtreecommitdiff
path: root/qc_app/templates/select_dataset.html
blob: a16fc75981b2f81dc17cbd58faef3e64927d9f64 (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
137
138
139
140
141
{%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 dataset</h2>

<div class="two-column-with-separator">
  <form method="POST" action="{{url_for('dbinsert.final_confirmation')}}"
	id="select-dataset-form" class="two-col-sep-col1">
    <legend>choose existing dataset</legend>
    {{hidden_fields(
    filename, filetype, species=species, genechipid=genechipid,
    studyid=studyid)}}

    <fieldset>
      <label for="datasetid" class="form-col-1">dataset:</label>
      <select id="datasetid" name="datasetid" class="form-col-2"
	      {%if datasets | length == 0:%}
	      disabled="disabled"
	      {%endif%}>
	{%for dataset in datasets:%}
	<option value="{{dataset['Id']}}">
	  [{{dataset["Name"]}}] - {{dataset["FullName"]}}
	</option>
	{%endfor%}
      </select>
    </fieldset>

    <fieldset>
      <input type="submit" class="btn btn-main form-col-2"
	     value="update database"
	     {%if datasets | length == 0:%}
	     disabled="disabled"
	     {%endif%} />
    </fieldset>
  </form>

  <p class="two-col-sep-separator">OR</p>

  <form method="POST" id="create-dataset-form"
	action="{{url_for('dbinsert.create_dataset')}}"
	class="two-col-sep-col2">
    <legend>create new dataset</legend>
    {{hidden_fields(
    filename, filetype, species=species, genechipid=genechipid,
    studyid=studyid)}}

    {%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%}

    <fieldset>
      <label for="avgid" class="form-col-1">average:</label>
      <select id="avgid" name="avgid" required="required" class="form-col-2">
	<option value="">Select averaging method</option>
	{%for method in avgmethods:%}
	<option value="{{method['AvgMethodId']}}">
	  {{method["Name"]}}
	</option>
	{%endfor%}
      </select>
    </fieldset>

    <fieldset>
      <label for="datasetname" class="form-col-1">name:</label>
      <input id="datasetname" name="datasetname" type="text"
	     class="form-col-2" />
    </fieldset>

    <fieldset>
      <label for="datasetname2" class="form-col-1">name 2:</label>
      <input id="datasetname2" name="datasetname2" type="text"
	     required="required" class="form-col-2" />
    </fieldset>

    <fieldset>
      <label for="datasetfullname" class="form-col-1">full name:</label>
      <input id="datasetfullname" name="datasetfullname" type="text"
	     required="required" class="form-col-2" />
    </fieldset>

    <fieldset>
      <label for="datasetshortname" class="form-col-1">short name:</label>
      <input id="datasetshortname" name="datasetshortname" type="text"
	     required="required" class="form-col-2" />
    </fieldset>

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

    <fieldset>
      <label for="datasetconfidentiality">confidentiality:</label>
      <input id="datasetconfidentiality" name="datasetconfidentiality"
	     type="number" required="required" min="0" max="2" value="0"
	     class="form-col-2" />
    </fieldset>

    <fieldset>
      <label for="datasetdatascale" class="form-col-1">data scale:</label>
      <select id="datasetdatascale" name="datasetdatascale" class="form-col-2">
	<option value="">None</option>
	{%for dscale in datascales:%}
	<option value="{{dscale}}"
		{%if dscale == "log2":%}
		selected="selected"
		{%endif%}>
	  {{dscale}}
	</option>
	{%endfor%}
      </select>
    </fieldset>

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

</div>

{%endblock%}

{%block javascript%}
<script type="text/javascript" src="/static/js/dbinsert.js"></script>
{%endblock%}