This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
form.html
77 lines (77 loc) · 1.88 KB
/
form.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Form</title>
<script src="/bundle.js"></script>
<style>
table {
border-collapse: collapse;
}
table td, table th {
border: 1px solid darkgrey;
}
input[type="number"] {
width: 3em;
}
</style>
</head>
<body>
<p>Welcome to form <span id="form-name"></span></p>
<!-- When new parties are added, this template node is cloned below -->
<div id="party-template" hidden>
<label>Name:
<input class="party-name">
</label>
<button class="party-delete">×</button>
</div>
<div id="parties"></div>
<div>
<button id="add-party">Add Party</button>
</div>
<hr>
<table id="items">
<thead>
<tr>
<th>Product</th>
<th>Quantity</th>
<th>Stock</th>
<th>Unit price</th>
</tr>
</thead>
<tbody>
<!-- When new items are added, this template node is cloned below -->
<tr id="item-template" hidden>
<td>
<select class="item-product">
<option>a</option>
<option>b</option>
<option>c</option>
<option>d</option>
<option>e</option>
</select>
</td>
<td>
<input class="item-quantity" type="number">
</td>
<td>
<input class="item-stock" type="number">
</td>
<td>
<input class="item-price" type="number">
</td>
<td>
<button class="item-up">↑</button>
<button class="item-down">↓</button>
<button class="item-delete">×</button>
</td>
</tr>
</tbody>
</table>
<div>
<button id="add-item">Add Item</button>
</div>
<!-- Messages to the user are put into the span when needed -->
<p><span id="message" hidden></span></p>
</body>
</html>