Bug 28079

Summary: Set focus to search box field when adding an order to basket
Product: Koha Reporter: Séverine Queune <severine.queune>
Component: AcquisitionsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: kyle, marjorie.barry-vila
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
21.11.00
Circulation function:
Attachments: Bug 28079: Set focus to search box field when adding an order to basket
Bug 28079: Set focus to search box field when adding an order to basket
Bug 28079: Set focus to search box field when adding an order to basket

Description Séverine Queune 2021-04-02 15:45:58 UTC
When adding an order to a basket, you have to click in the input box before searching for an existing record.
It could be usefull if the cursor was focused on the search box.
Comment 1 Owen Leonard 2021-10-11 18:17:19 UTC
Created attachment 126049 [details] [review]
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.
Comment 2 David Nind 2021-10-11 20:12:42 UTC
Created attachment 126050 [details] [review]
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>
Comment 3 Katrin Fischer 2021-10-19 21:53:09 UTC
Created attachment 126554 [details] [review]
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>
Comment 4 Jonathan Druart 2021-10-21 08:32:51 UTC
Pushed to master for 21.11, thanks to everybody involved!