Bug 28079: Set focus to search box field when adding an order to basket
authorOwen Leonard <oleonard@myacpl.org>
Mon, 11 Oct 2021 18:09:27 +0000 (18:09 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 21 Oct 2021 08:21:50 +0000 (10:21 +0200)
commit73a541e19c535cc6629e9b6dbac7598f8d434db1
treebfc76422ac3d372eef1ba16cc8396dfd87ed53cf
parenta0725b12a8d29cc91253b2ce5a78711010822389
Bug 28079: Set focus to search box field when adding an order to basket

This patch modifies the "Add to basket" modal in acquisitions so that
focus is automatically moved to the first form field when the modal
appears.

The patch also corrects the modal markup so that it's more consistent
with default Bootstrap markup.

To test, apply the patch and go to Acquisitions.

- Search for a vendor and, if necessary, create a basket.
- Click the "Add to basket" button. The modal which appears should
  have a header reading "Add order to basket <basketname>"
- The form field should have cursor focus.
- View the basket and click the "Add to basket" button in the toolbar.
- The modal shown should also be correct.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-add-to-basket.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/booksellers.tt