<!-- 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> <div class="mb-3 mb-md-4"> <label for="tournament_referee">Richter</label> <input type="text" value="<?= $tournamentdata['referee']; ?>" id="tournament_referee" name="tournament_referee" placeholder="Franz Ferdinand" class="form-control"> </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>