Add confirmation before deleting workout

This commit is contained in:
Peter Stockings
2023-03-10 22:30:41 +11:00
parent 56cf6813b7
commit 3ccae605cf

View File

@@ -22,7 +22,8 @@
<img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id) }}" alt="No image"> <img src="{{ url_for('workout', user_id=w.user_id, workout_id=w.id) }}" alt="No image">
<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-target="#container"> 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">
<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"