Add more details to user/workout delete confirmation

This commit is contained in:
Peter Stockings
2023-03-11 17:31:51 +11:00
parent 0625b1e3bf
commit f402839020
2 changed files with 4 additions and 3 deletions

View File

@@ -30,8 +30,8 @@
<div>{{ u.workouts_count }}</div> <div>{{ u.workouts_count }}</div>
<div class="flex"> <div class="flex">
<div hx-delete="{{ url_for('delete_user', user_id=u.id) }}" <div hx-delete="{{ url_for('delete_user', user_id=u.id) }}"
hx-confirm="Are you sure you wish to delete your account?" hx-target="#users-container" hx-confirm="Are you sure you wish to delete your account {{ u.name }}?"
class="pr-2"> hx-target="#users-container" class="pr-2">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6"> stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" <path stroke-linecap="round" stroke-linejoin="round"

View File

@@ -23,7 +23,8 @@
<button <button
class="mx-4 mb-4 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center" class="mx-4 mb-4 bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded inline-flex items-center"
hx-delete="{{ url_for('workout', user_id=w.user_id, workout_id=w.id) }}" hx-delete="{{ url_for('workout', user_id=w.user_id, workout_id=w.id) }}"
hx-confirm="Are you sure you wish to delete this workout" hx-target="#container"> hx-confirm="Are you sure you wish to delete this {{ w.duration }} workout at {{ w.start_time }}"
hx-target="#container">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
stroke="currentColor" class="w-6 h-6"> stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round" <path stroke-linecap="round" stroke-linejoin="round"