Files
timeclock/templates/index.html

102 lines
1.4 KiB
HTML
Raw Normal View History

2026-05-19 18:14:39 -04:00
<!DOCTYPE html>
<html>
<head>
<title>Time Clock</title>
</head>
<body>
<h1>Simple Time Clock</h1>
<form method="POST">
<table border="1" cellpadding="5">
<tr>
<td>User</td>
<td>
<select name="user_id">
{% for user in users %}
<option value="{{ user.id }}">
{{ user.name }}
</option>
{% endfor %}
</select>
</td>
</tr>
<tr>
<td>Clock Actions</td>
<td>
<button type="submit" name="action" value="clock_in">
Clock In
</button>
<button type="submit" name="action" value="clock_out">
Clock Out
</button>
</td>
</tr>
<tr>
<td>Begin Date</td>
<td>
<input
type="datetime-local"
name="begin_date"
value=""
>
</td>
</tr>
<tr>
<td>End Date</td>
<td>
<input
type="datetime-local"
name="end_date"
value=""
>
</td>
</tr>
<tr>
<td>Report</td>
<td>
<button type="submit" name="action" value="report">
Generate Report
</button>
</td>
</tr>
</table>
</form>
<br>
{% if report_hours is not none %}
<table border="1" cellpadding="5">
<tr>
<th>Total Hours Worked</th>
</tr>
<tr>
<td>{{ report_hours }}</td>
</tr>
</table>
{% endif %}
</body>
</html>