28 lines
2.3 KiB
HTML
28 lines
2.3 KiB
HTML
|
<div>
|
||
|
<h1>Turnier <?= $tournamentid?'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="<?= $tournamentid; ?>">
|
||
|
<div>
|
||
|
<label for="tournament_name" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Veranstaltung</label>
|
||
|
<input type="text" value="<?= $tournament['name']; ?>" id="tournament_name" name="tournament_name" 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="tournament_date" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Datum</label>
|
||
|
<input type="date" value="<?= $tournamentdata['tournament_date']; ?>" id="tournament_date" name="tournament_date" 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="tournament_judge" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Richter</label>
|
||
|
<input type="text" value="<?= $tournamentdata['tournament_judge']; ?>" id="tournament_judge" name="tournament_judge" 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>
|
||
|
<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>
|