Bug 7469

Summary: Focus on 1st field of creation form instead of search textbox
Product: Koha Reporter: Adrien SAURAT <adrien.saurat>
Component: TemplatesAssignee: Fridolin Somers <fridolin.somers>
Status: CLOSED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle, melia, sophie.meynieux
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 7469 - Focus on 1st field of creation form instead of search textbox (Acquisition)
[Signed off] Bug 7469 - Focus on 1st field of creation form instead of search textbox (Acquisition)
Bug 7469 - Focus on 1st field of creation form instead of search textbox (Acquisition)
Bug 7469 - Focus on 1st field of creation form instead of search textbox (Acquisition)

Description Adrien SAURAT 2012-01-25 16:09:08 UTC
When a user creates a new vendor, a new borrower or a new basket (maybe on others pages too, to be listed), a creation form is displayed, but the focus is still on the search textbox on page top.

It would be probably better to switch the focus to the first field of the creation form.
Comment 1 Fridolin Somers 2013-08-06 13:28:10 UTC Comment hidden (obsolete)
Comment 2 Melia Meggs 2013-08-10 00:08:35 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2013-08-16 11:52:12 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2013-09-13 10:37:18 UTC
Created attachment 21078 [details] [review]
Bug 7469 - Focus on 1st field of creation form instead of search textbox (Acquisition)

When a user creates a new vendor, a new borrower or a new basket (maybe on others pages too, to be listed), a creation form is displayed, but the focus is still on the search textbox on page top.
It would be probably better to switch the focus to the first field of the creation form.

This patch adds the focus, for acquisition module, on first input for pages with a data creation or modification or pages with only one form (like Z3950 search).

Test plan :
Go to pages and look where is the focus :
- acqui/basketgroup.pl : focus on "Basket group name:"
- acqui/basketheader.pl : focus on "Basket name:"
- acqui/invoices.tt : focus on "Invoice no:"
- acqui/modordernotes.pl : focus on "Notes:"
- acqui/neworderempty.pl : focus on "Title:"
- acqui/supplier.pl : focus on "Name:"
- acqui/z3950_search.pl : focus on "Title:"

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
The focus choice is relevant and works as described.
Comment 5 Galen Charlton 2013-09-16 15:59:47 UTC
Pushed to master, along with the follow-up that sets the focus for the acqui/parcels.pl form.

Thanks, Fridolyn!