-
Notifications
You must be signed in to change notification settings - Fork 0
/
maintenance.html
72 lines (60 loc) · 1.63 KB
/
maintenance.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
<p>View maintenance notes from:
<a href="maintenance.cgi?year=2004">2004</a> |
<a href="maintenance.cgi?year=2005">2005</a> |
<a href="maintenance.cgi?year=2006">2006</a> |
<a href="maintenance.cgi">2007</a>
<script>
var disabled = false;
</script>
<p>
<div class="heading">
<h2>Maintenance Board</h2>
</div>
<div class="content">
<form method="post">
<div id="notediv">
To post a maintenance request, fill in your name and a note below.
<table cellpadding="0" cellspacing="0" class="form" id="noteform">
<tr><td class="label">Name:</td>
<td><input type="text" name="name" size="25" /></td></tr>
<tr><td class="label textarealabel">Note:</td>
<td><textarea rows="5" cols="40" name="note"></textarea></td></tr>
<tr><td colspan="2">
<input type="submit" name="action" value="post note" />
</td></tr>
</table>
<hr>
</div>
__notes__
</form>
</div>
<script>
var selector = null;
var notediv = document.getElementById('notediv');
var noteform = null;
function movenote() {
if (selector) selector.style.display = 'block';
if (!noteform) {
noteform = document.getElementById('noteform').cloneNode(true);
}
var div = this.parentNode;
var cell = div.parentNode;
selector = div;
selector.style.display = 'none';
cell.appendChild(noteform);
}
function setup() {
if (disabled) {
notediv.style.display = 'none';
} else {
var inputs = document.getElementsByTagName('input');
for (var i = 0; i < inputs.length; i++) {
var input = inputs.item(i);
if (input.getAttribute('name') == 'id') {
input.onclick = movenote;
}
}
}
}
setup();
</script>