summaryrefslogtreecommitdiff
path: root/templates/admin/testexp.html
blob: 3a7d85c96c34b4dc1ed7420e181ad02ce5f0c6c7 (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
{% extends "layout.html" %}
{% load staticfiles %}

{% block content %}
<div class="container">
    <div class="row">
        {% include "account/sub_nav.html" %}
        <div class="span12">
            {% include "admin/sub_nav.html" %}
            <table id="tableId" class="table table-bordered table-condensed">
                <thead>
                    <tr>
                        <th>Date</th>
                        <th>Slot</th>
                        <th>Board</th>
                        <th>User</th>
                    </tr>
                </thead>
                <tbody>
                    {% for b in bookings %}
                    <tr>
                        <td>{{ b.booking_date }}</td>
                        <td>{{ b.slot }}</td>
                        <td>{{ b.account.board.mid }}</td>
                        <td>{{ b.account.name }}</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
				
        </div>
    </div>
</div>
<script>
function addRowHandlers() {
    var table = document.getElementById("tableId");
    var rows = table.getElementsByTagName("tr");
    for (i = 0; i < rows.length; i++) {
        var currentRow = table.rows[i];
        var createClickHandler = 
            function(row) 
            {
                return function() { 
                                        var cell = row.getElementsByTagName("td")[2];
                                        var id = cell.innerHTML;
                                        alert("id:" + id);
                                 };
            };

        currentRow.onclick = createClickHandler(currentRow);
    }
}
</script>
<div align="right">
<input type="number" step="0.1" id="temp">

<button onclick="getTemp()">Get Temperature</button>
<script>
function getTemp() {
    document.getElementById("field2").value = ;
}
<br> <br>
</script>
</div>


<form name="reset" action="" method="POST">
<div align="right">
<br><br>
<input type="hidden" value=100>
<input type="hidden" value=100>
<input type="submit" value="Reset Parameters">
<br><br>
</div>
</form>

<form name="set" action="" method="POST">
<div align="right">
Heater Input:<input type="number" size="3" name="Heater_Input">
Fan Input:<input type="number" size="3" name="Fan_Input">
<input type="submit" value="Set Parameters">
<br><br>
</div>
</form>

{% endblock %}