-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfeedback.html
111 lines (93 loc) · 3.53 KB
/
feedback.html
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
{%extends 'base.html'%}
{%block head%}
<title>Feedback Page</title>
<link rel="stylesheet" href="static/css/feedback.css">
<!-- <script src="{{ url_for('static', filename='js/feedback.js') }}"></script> -->
<style type="text/css">
.d-none {
display: none;
}
</style>
{%endblock%}
{%block body%}
<div class="forms">
<!-- <label for="options">Choose an option:</label> -->
<h1>Choose an option:</h1>
<select name="options" id="options" onchange="enablePonds(this)">
<option value="">Please select</option>
<option value="do">Manual DO input</option>
<option value="biomass">Manual Biomass input</option>
<option value="feedback">Feedback</option>
</select>
<form id="ponds" class="d-none">
<label for="pond_num">Pond Number</label>
<input
type="text"
id="pond"
name="pond"
placeholder="The pond number is...">
<label for="do_level">Collected DO level</label>
<input
type="text"
id="do"
name="do"
placeholder="The collected DO percentage is..." >
<input type="submit" value="Submit">
</form>
<form id="tanks" class="d-none">
<label for="tank_num">Tank Number</label>
<input
type="text"
id="tank"
name="tank"
placeholder="The tank number is...">
<label for="bms_level">Calculated Biomass</label>
<input
type="text"
id="biomass"
name="biomass"
placeholder="The calculated biomass is..." >
<input type="submit" value="Submit">
</form>
<form id="feedback" class="d-none">
<label for="name">Name</label>
<input
type="text"
id="name"
name="name"
placeholder="Your name">
<label for="comment">Comment</label>
<textarea
id="comment"
name="comment"
placeholder="Write something.."
style="height:6%">
</textarea>
<input type="submit" value="Submit">
</form>
</div>
<script type="text/javascript">
function enablePonds(answer) {
if (answer.value == "do"){
document.getElementById('ponds').classList.remove('d-none');
document.getElementById('tanks').classList.add('d-none');
document.getElementById('feedback').classList.add('d-none');
}
else if (answer.value == "biomass"){
document.getElementById('tanks').classList.remove('d-none');
document.getElementById('ponds').classList.add('d-none');
document.getElementById('feedback').classList.add('d-none');
}
else if (answer.value == "feedback"){
document.getElementById('feedback').classList.remove('d-none');
document.getElementById('tanks').classList.add('d-none');
document.getElementById('ponds').classList.add('d-none');
}
else{
document.getElementById('feedback').classList.add('d-none');
document.getElementById('tanks').classList.add('d-none');
document.getElementById('ponds').classList.add('d-none');
}
}
</script>
{%endblock%}