Bug 9137

Summary: Focus when editing/adding new itemtypes/authorised values
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: chris, jcamins, melia
Version: Main   
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 9137 - Focus when editing/adding new itemtypes/authorised values
[Signed off] Bug 9137 - Focus when editing/adding new itemtypes/authorised values
[SIGNED-OFF] Bug 9137 - Focus when editing/adding new itemtypes/authorised values

Description Katrin Fischer 2012-11-25 22:15:12 UTC
When you add a new authorised value or a new item type the focus is in no field on the page. I think it would be nice if you could start writing directly into the first field of the form after clicking the 'new ...' button.
Comment 1 Owen Leonard 2012-11-26 15:55:41 UTC Comment hidden (obsolete)
Comment 2 Melia Meggs 2012-11-27 00:34:51 UTC
I followed the test plan, and found that the focus is in the first field on the page by default without having to click anywhere.  Very helpful, and works as advertised!

(I had to add a "patch complexity" to this enhancement request in order to sign it off - hopefully "trivial" is ok, but if not, someone else please change it!)
Comment 3 Melia Meggs 2012-11-27 00:35:25 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2012-11-28 06:52:21 UTC
Created attachment 13721 [details] [review]
[SIGNED-OFF] Bug 9137 - Focus when editing/adding new itemtypes/authorised values

This patch adds the "focus" class to the relevant inputs so
that the global staff client JS will move the focus to those fields.
Logic in the authorised_values template puts the focus on the
correct field whether you're adding a new category, a new value,
or performing an edit.

To test, try the following operations:
 - add an itemtype
 - edit an itemtype
 - add an authorised value category
 - add an authorised value value
 - edit an authorised value value

In all cases the focus should automatically be in the first
form field.

Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests pass and works nicely.
Comment 5 Jared Camins-Esakov 2012-11-28 21:52:54 UTC
This patch has been pushed to master.
Comment 6 Chris Cormack 2012-11-29 07:34:23 UTC
Pushed to 3.10.x, will be in 3.10.1
Comment 7 Chris Cormack 2012-11-29 22:33:55 UTC
Pushed to 3.8.x will be in 3.8.8