Bug 7469: put focus on 1st field of creation form instead of search box (Acquisition)
authorFridolyn SOMERS <fridolyn.somers@biblibre.com>
Tue, 6 Aug 2013 12:21:10 +0000 (14:21 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 16 Sep 2013 15:53:17 +0000 (15:53 +0000)
commitf92c74b65aa57928defcd6288be12d777e4c5110
treeef91474a6219b39e1fd0b132720343bd5459960f
parent301d20715fcdf2dd72295741d3ef3ae4de20ccc5
Bug 7469: put focus on 1st field of creation form instead of search box (Acquisition)

When a user creates a new vendor, a new borrower or a new basket
(maybe on others page 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 acquisitions 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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketheader.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoices.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/modordernotes.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/supplier.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/z3950_search.tt