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/dogs/edit.html

38 lines
4.0 KiB
HTML
Raw Normal View History

2023-10-22 23:05:24 +02:00
<div class="container mx-auto">
<h1 class="text-4xl md:text-5xl">Hund hinzufügen/bearbeiten</h1>
<form hx-post="/dogs/edit" hx-target="#response">
<input type="hidden" name="dog_id" value="<?= $dogid; ?>">
<div>
<label for="name" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Name</label>
<input type="text" value="<?= $dogdata['name']; ?>" id="name" name="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="kennel_name" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Zuchtname</label>
<input type="text" value="<?= $dogdata['kennel_name']; ?>" id="kennel_name" name="kennel_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="Zuchtname">
</div>
<div>
<label for="dog_breed" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Rasse</label>
<input type="text" value="<?= $dogdata['breed']; ?>" id="dog_breed" name="dog_breed" 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="dog_size" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Größe des Hundes (in cm)</label>
<input type="number" value="<?= $dogdata['size']; ?>" id="dog_size" name="dog_size" 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="">
</div>
<div>
<label for="dog_birthday" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Geburtstag des Hundes</label>
<input type="date" value="<?= $dogdata['birthday']; ?>" id="dog_birthday" name="dog_birthday" 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="" required>
</div>
<div>
<label for="agi_height_category" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Agility Größenklasse</label>
<select id="agi_height_category" name="agi_height_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="S" <?= $dogdata['agility_size']=='S'?'selected':''; ?>>S</option>
<option value="M" <?= $dogdata['agility_size']=='M'?'selected':''; ?>>M</option>
<option value="I" <?= $dogdata['agility_size']=='I'?'selected':''; ?>>I</option>
<option value="L" <?= $dogdata['agility_size']=='L'?'selected':''; ?>>L</option>
</select>
</div>
<button type="submit" name="submit" value="true" class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">Submit</button>
</form>
<div id="response"></div>
</div>