-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
112 lines (99 loc) · 3.37 KB
/
index.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
112
<!DOCTYPE html>
<html>
<head>
<title>Input form</title>
<style>
.inline {
display: inline-block;
margin-right: 10px;
}
.time-input {
width: 30px;
text-align: center;
}
</style>
</head>
<body>
<h1>input form</h1>
<!-- エラーメッセージ表示 -->
{{ if .ErrorMsgs }}
<div style="color: red;">
<ul>
{{ range .ErrorMsgs }}
<li>{{ . }}</li>
{{ end }}
</ul>
</div>
{{ end }}
<!-- フォーム -->
<form id="dataForm" action="/" method="post">
<div class="inline">
<label for="month">month / day: </label>
<input type="text" id="month" name="month">
<label for="slash"> / </label>
<input type="text" id="date" name="date"> <br><br>
<label for="day">day of the week: </label>
<input type="text" id="day" name="day">
</div><br><br>
<label for="event">event: </label>
<input type="text" id="event" name="event"><br><br>
<div class="inline">
<label for="start_hour">start time: </label>
<input type="text" id="start_hour" name="start_hour" class="time-input">
<label for="start_min">start min: </label>
<input type="text" id="start_min" name="start_min" class="time-input">
</div><br><br>
<div class="inline">
<label for="end_hour">end time: </label>
<input type="text" id="end_hour" name="end_hour" class="time-input">
<label for="end_min">end min: </label>
<input type="text" id="end_min" name="end_min" class="time-input">
</div><br><br>
<label for="memo">memo: </label>
<input type="text" id="memo" name="memo"><br><br>
<label for="record">record: </label>
<input type="text" id="record" name="record"><br><br><br>
<!-- <label for="method">Add or Search: </label>
<input type="text" id="event" name="event"><br> -->
<legend>Pease select Add or Search.</legend><br>
<input type="radio" id="add" name="action" value="add" />
<label for="add">Add</label>
<input type="radio" id="search" name="action" value="search" />
<label for="search">Search</label><br><br>
<button type="submit">Execute</button><br><br>
</form>
<!-- テーブル -->
<table id="dataTable" border="1">
<thead>
<tr>
<th>month</th>
<th>date</th>
<th>day of the week</th>
<th>event</th>
<th>start hour</th>
<th>start min</th>
<th>end hour</th>
<th>end min</th>
<th>memo</th>
<th>record</th>
</tr>
</thead>
<tbody>
{{ range .ScheduleList}}
<tr>
<td>{{ .Month }}</td>
<td>{{ .Date }}</td>
<td>{{ .Day }}</td>
<td>{{ .EventName}}</td>
<td>{{ .StartHour }}</td>
<td>{{ .StartMin }}</td>
<td>{{ .EndHour }}</td>
<td>{{ .EndMin }}</td>
<td>{{ .Memo }}</td>
<td>{{ .Record }}</td>
</tr>
{{ end }}
</tbody>
</table>
</body>
</html>