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/admin/edituser.html
Chris e343bb8f48
All checks were successful
Build and push / Pulling repo on server (push) Successful in 2s
mehr bootstrap updates
2023-10-23 13:59:26 +02:00

37 lines
2.4 KiB
HTML

<form hx-post="/admin/edituserdata" hx-target="#response">
<div id="defaultModal" tabindex="-1" aria-hidden="true" class="z-50 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full">
<div class="relative w-full max-w-2xl max-h-full">
<!-- Modal content -->
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
<!-- Modal header -->
<div class="flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600">
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
Edit user <?= $userid ?>
</h3>
</div>
<!-- Modal body -->
<div class="p-6 space-y-6">
<div class="flex flex-col">
<label for="id" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">
ID
</label>
<input type="text" name="id" disabled id="id" value="<?= $userid ?>" class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 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">
</div>
<?php foreach (array_keys($userdata) as $key) : ?>
<div class="flex flex-col">
<label for="<?= $key ?>" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">
<?= $key ?>
</label>
<input type="text" name="<?= $key ?>" id="<?= $key ?>" value="<?= is_array($userdata[$key])?escape(json_encode($userdata[$key])):$userdata[$key] ?>" class="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-600 focus:border-primary-600 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">
</div>
<?php endforeach; ?>
</div>
<!-- Modal footer -->
<div class="flex items-center p-6 space-x-2 border-t border-gray-200 rounded-b dark:border-gray-600">
<button type="submit" class="btn btn-primary">Save</button>
<div id="response"></div>
</div>
</div>
</div>
</div>
</form>