Files
qv/ui/create-election.html
2025-01-13 10:56:36 +01:00

67 lines
2.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create New Election</title>
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<div class="container">
<main>
<h1>Create New Election</h1>
<form action="/elections" method="POST" class="form">
<div class="form-group">
<label for="name">Election Name</label>
<input type="text" id="name" name="name" required>
</div>
<div class="form-row">
<div class="form-group">
<label for="tokens">Tokens per Voter</label>
<input type="number" id="tokens" name="tokens" min="1" required>
</div>
<div class="form-group">
<label for="are_voters_known">Voter Access</label>
<select id="are_voters_known" name="are_voters_known" required>
<option value="1">Known voters only</option>
<option value="0">Open to anyone</option>
</select>
</div>
</div>
<div class="form-group" id="max-voters-group">
<label for="max_voters">Maximum Number of Voters</label>
<input type="number" id="max_voters" name="max_voters" min="1">
</div>
<div class="form-group">
<label for="expires_at">Expiration Date</label>
<input type="datetime-local" id="expires_at" name="expires_at" required>
</div>
<div class="form-group">
<label>Choices</label>
<div id="choices-container">
<div class="choice-input">
<input type="text" name="choices[]" required>
<button type="button" class="remove-choice" hidden>×</button>
</div>
<div class="choice-input">
<input type="text" name="choices[]" required>
<button type="button" class="remove-choice" hidden>×</button>
</div>
</div>
<button type="button" id="add-choice">Add Another Choice</button>
</div>
<div class="form-actions">
<button type="submit">Create Election</button>
</div>
</form>
</main>
</div>
</body>
</html>