tracreport/static/generate-report.html

67 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TrACreport</title>
<style>
body {
font-family: sans-serif;
max-width: 600px;
margin: 2rem auto;
text-align: center;
}
form {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
}
label {
font-weight: bold;
}
input[type="date"],
input[type="password"],
button {
padding: 0.5rem;
font-size: 1rem;
}
</style>
</head>
<body>
<h1>TrACreport</h1>
<h2>Generate Fault Report</h2>
<form id="reportForm" action="/report" method="GET" target="_blank">
<div>
<label for="start">Start Date:</label>
<input type="date" id="start" name="start" required>
</div>
<div>
<label for="end">End Date:</label>
<input type="date" id="end" name="end" required>
</div>
<div>
<label for="password">Access Password:</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">Generate Report</button>
</form>
<script>
// Default both fields to today's date
const today = new Date().toISOString().split('T')[0];
document.getElementById('start').value = today;
document.getElementById('end').value = today;
</script>
</body>
</html>