This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/web/pages/runs/edit_run.html

48 lines
2.5 KiB
HTML
Raw Normal View History

2023-10-30 22:20:13 +01:00
<!-- das hier sollte bei einem Turnier mehrfach hinzugefügt werden können. Auswahl aus Agility & Jumping -->
<div>
2023-10-30 22:24:26 +01:00
<h1>Lauf <?= $run_id?'Bearbeiten':'Hinzufügen'; ?></h1>
2023-10-30 22:20:13 +01:00
<form id="tournamenteditform" hx-post="/runs/validate" hx-encoding='multipart/form-data' hx-target="#response">
<input type="hidden" name="tournament_id" value="<?= $tournament_id; ?>">
<input type="hidden" name="run_id" value="<?= $run_id; ?>">
<h2>Parcourdetails</h2>
2023-11-02 17:59:19 +01:00
<div class="mb-3 mb-md-4">
2023-10-30 22:20:13 +01:00
<label for="name">Bezeichnung</label>
2023-11-02 17:59:19 +01:00
<input type="text" value="<?= $run['name']; ?>" id="name" name="name" class="form-control" placeholder="zb: Oldies Jumping" required>
2023-10-30 22:20:13 +01:00
</div>
2023-11-02 17:59:19 +01:00
<div class="mb-3 mb-md-4">
2023-10-30 22:20:13 +01:00
<label for="category">Parcourtyp</label>
2023-11-02 17:59:19 +01:00
<select id="category" name="category" class="form-control">
2023-10-30 22:20:13 +01:00
<option value="Agility" <?= $run['category']=='Agility'?'selected':''; ?>>Agility</option>
<option value="Jumping" <?= $run['category']=='Jumping'?'selected':''; ?>>Jumping</option>
</select>
</div>
2023-11-02 17:59:19 +01:00
<div class="mb-3 mb-md-4">
2023-10-30 22:20:13 +01:00
<label for="length">Parcourlänge (in m)</label>
2023-11-02 17:59:19 +01:00
<input type="number" min="1" max="1000" value="<?= $run['length']; ?>" id="length" name="length" class="form-control" placeholder="180">
2023-10-30 22:20:13 +01:00
</div>
2023-11-02 17:59:19 +01:00
<div class="mb-3 mb-md-4">
2023-10-30 22:20:13 +01:00
<label for="time_standard">Normzeit</label>
2023-11-02 17:59:19 +01:00
<input type="number" value="<?= $run['time_standard']?:0; ?>" id="time_standard" name="time_standard" class="form-control" placeholder="50.000">
2023-10-30 22:20:13 +01:00
</div>
2023-11-02 17:59:19 +01:00
<div class="mb-3 mb-md-4">
2023-10-30 22:20:13 +01:00
<label for="time_max">Maxzeit</label>
2023-11-02 17:59:19 +01:00
<input type="number" value="<?= $run['time_max']?:0; ?>" id="time_max" name="time_max" class="form-control" placeholder="100.000">
2023-10-30 22:20:13 +01:00
</div>
<div class="mb-3 mb-md-4">
<label for="referee">Richter</label>
2023-11-02 17:59:19 +01:00
<input type="text" value="<?= $run['referee']; ?>" id="referee" name="referee" class="form-control" placeholder="Franz Ferdinand" class="form-control">
2023-10-30 22:20:13 +01:00
</div>
<button type="submit" name="submit" value="true" class="btn btn-primary">Speichern</button>
<button type="submit" name="submit" value="forward" class="btn btn-primary">Speichern und Ergebnisse eintragen</button>
2023-10-30 22:20:13 +01:00
</form>
<progress id='progress' value='0' max='100'></progress>
<div id="response"></div>
</div>
<script>
htmx.on('#dogeditform', 'htmx:xhr:progress', function(evt) {
htmx.find('#progress').setAttribute('value', evt.detail.loaded/evt.detail.total * 100)
});
</script>