Files
TimeTracker/app
Dries Peeters 7c518171f1 fix: use project's custom confirmation dialog for event deletion
Replaced browser's native confirm() dialog with the project's custom
confirm_dialog macro for consistency with the rest of the application.

Changes:
- Imported confirm_dialog macro from components/ui.html in event_detail.html
- Updated delete button to trigger custom modal instead of native confirm
- Modified delete_event route to accept both POST and DELETE methods
- Added flash messages and redirect logic for POST-based deletion
- Replaced JavaScript fetch-based deletion with form submission pattern
- Used hidden form with CSRF token for secure deletion (consistent with
  tasks and time entries deletion pattern)

The custom dialog provides:
- Consistent UI/UX matching the project's dark theme
- Better accessibility
- Proper styling with danger-colored confirmation button
- Standard project pattern for destructive actions

Fixes: Event deletion showing browser's native unstyled confirmation dialog
Related: Calendar feature implementation
2025-10-27 12:51:05 +01:00
..
2025-10-21 20:03:21 +02:00