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/tournaments/edit_run.html
Chris 135958c9f0
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
404 seiten auf unterseiten gehen jetzt, icons werden jetzt korrekt bei menüs angezeigt, die submenüs haben
2023-10-26 20:26:28 +02:00

96 lines
9.5 KiB
HTML

<!-- das hier sollte bei einem Turnier mehrfach hinzugefügt werden können. Auswahl aus Agility & Jumping -->
<div>
<h1>Agility / Jumping <?= $run_id?'Bearbeiten':'Hinzufügen'; ?></h1>
<form id="tournamenteditform" hx-post="/tournaments/edit" hx-encoding='multipart/form-data' hx-target="#response">
<input type="hidden" name="tournament_id" value="<?= $run_id; ?>">
<h2>Parcourdetails</h2>
<div>
<label for="run_category" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Parcourtyp</label>
<select id="run_category" name="run_category" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
<option value="Agility" <?= $tournamentdata['run_category']=='Agility'?'selected':''; ?>>Agility</option>
<option value="Jumping" <?= $tournamentdata['run_category']=='Jumping'?'selected':''; ?>>Jumping</option>
</select>
</div>
<div>
<label for="run_length" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Parcourlänge (in m)</label>
<input type="text" value="<?= $run['run_length']; ?>" id="run_length" name="run_length" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Max" required>
</div>
<div>
<label for="norm_time" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Normzeit</label>
<input type="number" value="<?= $run['norm_time']; ?>" id="norm_time" name="norm_time" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Zuchtname">
</div>
<div>
<label for="max_time" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Maxzeit</label>
<input type="number" value="<?= $run['max_time']; ?>" id="max_time" name="max_time" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<h2>Ergebnis</h2>
<div>
<label for="eliminated" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Disqualifiziert</label>
<input type="number" value="<?= $run['eliminated']; ?>" id="eliminated" name="eliminated" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="refusals" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Verweigerungen</label>
<input type="number" value="<?= $run['refusals']; ?>" id="refusals" name="refusals" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="faults" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Fehler</label>
<input type="number" value="<?= $run['faults']; ?>" id="faults" name="faults" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="time_faults" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Zeitfehler</label>
<input type="number" value="<?= $run['time_faults']; ?>" id="time_faults" name="time_faults" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="time" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Zeit</label>
<input type="number" value="<?= $run['time']; ?>" id="time" name="time" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="penalties" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Gesamtfehler</label>
<input type="number" value="<?= $run['penalties']; ?>" id="penalties" name="penalties" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="time_speed" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">m/Sek</label>
<input type="number" value="<?= $run['time_speed']; ?>" id="time_speed" name="time_speed" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="bewertung" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Bewertung</label>
<select id="bewertung" name="bewertung" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
<option value="V" <?= $tournamentdata['bewertung']=='V'?'selected':''; ?>>V</option>
<option value="SG" <?= $tournamentdata['bewertung']=='SG'?'selected':''; ?>>SG</option>
<option value="G" <?= $tournamentdata['bewertung']=='G'?'selected':''; ?>>G</option>
<option Galue="B" <?= $tournamentdata['bewertung']=='B'?'selected':''; ?>>B</option>
</select>
</div>
<div>
<label for="points" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Punkte</label>
<input type="number" value="<?= $run['points']; ?>" id="points" name="points" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="rank" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Platz</label>
<input type="number" value="<?= $run['rank']; ?>" id="rank" name="rank" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Flowbite">
</div>
<div>
<label for="uploads" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Uploads</label>
<input type="file" accept="image/png, image/jpeg, image/gif" id="uploads" name="uploads">
</div>
<div>
<label for="video-url" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Video Url</label>
<input type="text" value="<?= $run['video-url']; ?>" class="form-control" id="video-url" aria-describedby="basic-addon3">
</div>
<div>
<label for="memo" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Memo</label>
<textarea value="<?= $run['memo']; ?>" id="memo" name="memo" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="Deine Gedankengänge"></textarea>
</div>
<button type="submit" name="submit" value="true" class="btn btn-primary">Submit</button> <!-- Submit Button führt auf eine neue Seite wo man die Laufinfo eingibt -->
</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>