From 6cc4853d4f42e738db4d034debc25a2b9edde1b2 Mon Sep 17 00:00:00 2001 From: Jojo144 Date: Mon, 28 Aug 2023 23:20:34 +0200 Subject: [PATCH] Simplifies adding a bill with keyboard only --- ihatemoney/templates/list_bills.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ihatemoney/templates/list_bills.html b/ihatemoney/templates/list_bills.html index 749c9070b..79e252625 100644 --- a/ihatemoney/templates/list_bills.html +++ b/ihatemoney/templates/list_bills.html @@ -11,6 +11,11 @@ {% block js %} {% if add_bill %} $('#new-bill > a').click(); {% endif %} + // focus on first field when adding a bill + $("#bill-form").on('shown.bs.modal', function(){ + $(this).find('#what').focus(); + }); + // ask for confirmation before removing an user $('.action.delete').each(function(){ var link = $(this).find('button'); @@ -101,7 +106,7 @@ {% endif %} - + {{ static_include("images/plus.svg") | safe }} {{ _("Add a new bill") }}