From 86201ec1d7714fb0b7f4a751b165e4aeb5ed0da8 Mon Sep 17 00:00:00 2001 From: Ross Date: Wed, 17 Dec 2025 16:11:37 +0000 Subject: [PATCH] Enhance focus handling in modals to improve user experience by scrolling to and focusing on relevant fields --- .../rota/partials/shift_form_modal.html | 25 +++++++++++++++ .../templates/rota/partials/shift_list.html | 4 +-- .../rota/partials/worker_form_modal.html | 31 +++++++++++++++++++ .../templates/rota/partials/worker_list.html | 10 +++--- djangorota/rota/views.py | 8 ++--- 5 files changed, 67 insertions(+), 11 deletions(-) diff --git a/djangorota/djangorota/templates/rota/partials/shift_form_modal.html b/djangorota/djangorota/templates/rota/partials/shift_form_modal.html index 61da3d4..f296b33 100644 --- a/djangorota/djangorota/templates/rota/partials/shift_form_modal.html +++ b/djangorota/djangorota/templates/rota/partials/shift_form_modal.html @@ -29,6 +29,31 @@ function _close_shift_modal_targets(){ + {% if focus %} + + {% endif %} + {% endif %}