Bug 31405

Summary: Set focus for cursor to setSpec input when adding a new OAI set
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: TemplatesAssignee: Katrin Fischer <katrin.fischer>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: danyonsewell, david, jonathan.druart, lucas, martin.renvoize
Version: MainKeywords: Academy
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:
23.05.00,22.11.06,22.05.14,21.11.22
Circulation function:
Bug Depends on:    
Bug Blocks: 31411    
Attachments: Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set
dBug 31405: Set focus for cursor to setSpec input when adding a new OAI set
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Description Katrin Fischer 2022-08-18 21:48:33 UTC
When adding a new OAI set from administration, the focus/cursor should be in the first field of the entry form: setSpec
Comment 1 Katrin Fischer 2023-02-04 23:56:08 UTC
Created attachment 146177 [details] [review]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
Comment 2 Owen Leonard 2023-02-06 13:28:41 UTC
Created attachment 146267 [details] [review]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Lucas Gass (lukeg) 2023-03-02 17:12:14 UTC
In other places we only set the focus when adding and but when editing? Should we do that here to? 

See Bug 31410.
Comment 4 Katrin Fischer 2023-04-23 15:40:01 UTC
Created attachment 150133 [details] [review]
dBug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Katrin Fischer 2023-04-23 15:40:51 UTC
(In reply to Lucas Gass from comment #3)
> In other places we only set the focus when adding and but when editing?
> Should we do that here to? 
> 
> See Bug 31410.

I changed the patch to not set the focus on the description when an existing set is edited. This is to avoid accidental changes and matches behavior on other pages, as Lucas has pointed out.
Comment 6 David Nind 2023-04-23 18:22:40 UTC
Created attachment 150134 [details] [review]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2023-04-23 18:24:37 UTC Comment hidden (obsolete)
Comment 8 Nick Clemens (kidclamp) 2023-04-28 16:23:28 UTC
Created attachment 150397 [details] [review]
Bug 31405: Set focus for cursor to setSpec input when adding a new OAI set

Makes sure the focus is in the first form field when adding
a new OAI set: setSpec

To test:
* Go to administration > OAI sets
* Add a new set, verify the focus is still in the search bar on top
* Apply patch
* Repeat and verify the focus is now in the first form field
* Save set
* Edit set and verify the focus is in the search field at the top

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 9 Tomás Cohen Arazi (tcohen) 2023-05-05 15:14:30 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 10 Martin Renvoize (ashimema) 2023-05-12 15:23:45 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 11 Lucas Gass (lukeg) 2023-06-13 16:23:10 UTC
Backported to 22.05.x for upcoming 22.05.14.
Comment 12 Danyon Sewell 2023-07-21 02:15:27 UTC
Backported to 21.11.x for upcoming 21.11.22