Each vote can require N fresh codes read off the projector (default 3, off for rooms without a projector); voters enrolled with a paper or rescue code are exempt. Rescue codes enroll a phone without camera. Projector keeps the QR up while such a vote is open. Server pings every socket every 25s so proxies keep them open. Composer no longer closes on enter. Schema migrates existing databases.
78 lines
3.1 KiB
HTML
78 lines
3.1 KiB
HTML
<!doctype html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>RotatyVote · Nouveau scrutin</title>
|
|
<link rel="icon" href="/static/img/mark.svg" type="image/svg+xml">
|
|
<link rel="stylesheet" href="/static/css/app.css">
|
|
<script type="module" src="/static/js/index.js"></script>
|
|
</head>
|
|
<body>
|
|
<main class="wrap narrow">
|
|
<div class="topbar"><a class="brand" href="/"><img src="/static/img/mark.svg" alt=""><span>rotaty<b>vote</b></span></a></div>
|
|
|
|
<section id="create" class="card">
|
|
<h1>Nouveau scrutin</h1>
|
|
<form id="form">
|
|
<label for="title">Titre</label>
|
|
<input id="title" type="text" required maxlength="200" placeholder="Assemblée générale 2026">
|
|
|
|
<div class="row">
|
|
<div>
|
|
<label for="interval">Rotation du QR</label>
|
|
<select id="interval">
|
|
<option value="500">0,5 s</option>
|
|
<option value="1000" selected>1 s</option>
|
|
<option value="1500">1,5 s</option>
|
|
<option value="2000">2 s</option>
|
|
</select>
|
|
</div>
|
|
<div>
|
|
<label for="scans">Codes à scanner</label>
|
|
<input id="scans" type="number" min="2" max="20" value="5">
|
|
</div>
|
|
</div>
|
|
<p class="hint" id="duration-hint"></p>
|
|
|
|
<div class="row">
|
|
<div>
|
|
<label for="expected">Personnes attendues</label>
|
|
<input id="expected" type="number" min="1" placeholder="facultatif">
|
|
</div>
|
|
<div>
|
|
<label for="maxv">Plafond d'inscriptions</label>
|
|
<input id="maxv" type="number" min="1" placeholder="aucun">
|
|
</div>
|
|
</div>
|
|
|
|
<label class="inline"><input id="vote-scans-on" type="checkbox" checked> Confirmer chaque vote par 3 scans</label>
|
|
<label class="inline"><input id="codes-on" type="checkbox"> Exiger un code papier à usage unique</label>
|
|
<div id="codes-box" hidden>
|
|
<label for="codes">Nombre de codes à générer</label>
|
|
<input id="codes" type="number" min="1" max="5000" value="50">
|
|
</div>
|
|
|
|
<div id="pw-box" hidden>
|
|
<label for="pw">Mot de passe de création</label>
|
|
<input id="pw" type="password" autocomplete="current-password">
|
|
</div>
|
|
|
|
<div class="actions"><button class="primary block" type="submit">Créer le scrutin</button></div>
|
|
</form>
|
|
</section>
|
|
|
|
<section id="done" class="card" hidden>
|
|
<h1>Scrutin créé</h1>
|
|
<div class="notice warn">Conservez le lien d'administration : il ne pourra pas être récupéré.</div>
|
|
<label>Lien d'administration</label>
|
|
<div class="linkbox"><input id="admin-link" type="text" readonly><button id="copy-admin" class="small" type="button">Copier</button></div>
|
|
<label>Lien du projecteur</label>
|
|
<div class="linkbox"><input id="screen-link" type="text" readonly><button id="copy-screen" class="small" type="button">Copier</button></div>
|
|
<p class="hint">Pour l'ordinateur du vidéoprojecteur. Ne pas diffuser.</p>
|
|
<div class="actions"><a id="go-admin" class="btn primary block" href="#">Ouvrir l'administration</a></div>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|