pcmt/templates/manage/user-delete.tmpl

61 lines
2.8 KiB
Go HTML Template
Raw Normal View History

2023-08-07 21:29:30 +02:00
{{ template "head.tmpl" . }}
<body class="min-h-screen flex flex-col justify-between bg-white dark:bg-gray-900">
{{ template "navbar.tmpl" . }}
<main class="grow mb-auto">
<div class="container mx-auto place-items-center px-8 md:px-12 lg:px-14">
{{if and .Data .Data.user -}}
<div class="flex justify-between place-items-center">
<h1 class="text-xl font-bold text-fuchsia-600 dark:text-fuchsia-400 py-2 ring-fuchsia-300">
Deleting user "{{ .Data.user.Username }}"
</h1>
<a href="/manage/users" class="w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 md:mx-6 lg:mx-4 hover:underline dark:text-blue-400">
⏎ All users
</a>
</div>
<div class="flex justify-end gap-2 lg:gap-0 place-items-center">
<a href="/manage/users/{{- .Data.user.ID -}}" class="w-auto py-1 mt-0 text-center text-blue-500 dark:text-blue-400 md:mx-2 lg:mx-4 hover:underline hover:text-blue-600 dark:hover:text-blue-300">
Back to detail
</a>
</div>
<div class="flex justify-center place-items-center mt-8 lg:mx-auto">
<p class="text-xl text-pink-600 dark:text-pink-400 py-2 px-10">
<span class="italic">Are you sure</span> you want to <span class="underline non-italic">permanently</span> and irrevocably DELETE user <span class="font-mono font-bold">{{.Data.user.Username}}</span> along with all their data?
</p>
</div>
<div class="container flex justify-center place-items-center mt-4 px-11 mx-auto text-xl">
<a href="/manage/users/{{- .Data.user.ID -}}" class="w-auto mt-0 text-center text-blue-400 dark:text-blue-400 mx-2 lg:mx-4 hover:underline hover:text-blue-500 dark:hover:text-blue-300">
Cancel
</a>
<form method="post" action="/manage/users/{{- .Data.user.ID -}}/delete" class="w-auto">
<input type="hidden" name="_csrf" value="{{- .CSRF -}}">
<button class="w-auto py-1 px-2 text-center text-pink-600 dark:text-pink-600 md:ml-6 lg:ml-4 hover:underline hover:text-pink-700 dark:hover:text-pink-400 border-2 border-pink-300 rounded-md hover:shadow-lg">
Confirm permanent deletion
</button>
</form>
</div>
{{- else -}}
<div class="flex justify-between place-items-center">
<h1 class="text-xl font-bold text-fuchsia-600 dark:text-fuchsia-400 py-2">
Delete user
</h1>
<a href="/manage/users" class="w-auto py-1 mt-2 text-center text-blue-500 md:mt-0 md:mx-6 lg:mx-4 hover:underline dark:text-blue-400">
⏎ All users
</a>
</div>
<div class="items-center place-items-center">
<p class="text-pink-400 italic">
Encountered an issue loading the user for deletion.
</p>
</div>
{{- end -}}
{{- if and .Data .Data.flash -}}
<div class="place-items-center">
<h1 class="text-2xl text-pink-600 dark:text-pink-500 py-2">
{{ .Data.flash -}}
</h1>
</div>
{{- end}}
</div>
</main>
{{ template "footer.tmpl" . }}