Bug 27191 - Set focus for cursor to category code input box when creating new patron categories
Summary: Set focus for cursor to category code input box when creating new patron cate...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Katrin Fischer
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2020-12-10 16:06 UTC by Barbara Johnson
Modified: 2023-12-28 20:43 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This updates the new patron category input form so that the cursor focus is on the category code input field.
Version(s) released in:
22.11.00


Attachments
bug 27191: Set focus for cursor to category code input box when creating new patron categories (1.27 KB, patch)
2021-01-19 02:05 UTC, Victoria Faafia
Details | Diff | Splinter Review
bug 27191: Set focus for cursor to category code input box when creating new patron categories (1.33 KB, patch)
2021-01-19 12:13 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27191: Set focus for cursor to category code input box when creating new patron categories (1.40 KB, patch)
2021-01-21 19:22 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27191: Set focus on first input when adding a new patron category (1.56 KB, patch)
2022-08-18 20:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27191: Set focus on first input when adding a new patron category (1.62 KB, patch)
2022-08-18 20:40 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 27191: Set focus on first input when adding a new patron category (1.67 KB, patch)
2022-08-18 20:45 UTC, David Nind
Details | Diff | Splinter Review
Bug 27191: Set focus on first input when adding a new patron category (1.72 KB, patch)
2022-09-02 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Barbara Johnson 2020-12-10 16:06:25 UTC
When adding a new patron category on categories.pl you have to click in the category code input box, which is a required field, so that you can enter text.  It would be more efficient to set the focus for the cursor to always be in the category code input box so that you could just begin typing and eliminate an extra click.
Comment 1 Victoria Faafia 2021-01-19 02:05:40 UTC
Created attachment 115283 [details] [review]
bug 27191: Set focus for cursor to category code input box when creating new patron categories

1-Go to admin>patroncategories>newcategory
2-The category code box should be green and already have the cursor inside without you clicking on it
3-Refresh page to double check the cursor automatically goes to the category code box
Comment 2 PTFS Europe Sandboxes 2021-01-19 12:13:01 UTC
Created attachment 115313 [details] [review]
bug 27191: Set focus for cursor to category code input box when creating new patron categories

1-Go to admin>patroncategories>newcategory
2-The category code box should be green and already have the cursor inside without you clicking on it
3-Refresh page to double check the cursor automatically goes to the category code box

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 3 Sally 2021-01-19 12:13:52 UTC
Works as described.
Comment 4 Kyle M Hall 2021-01-21 19:22:00 UTC
Created attachment 115598 [details] [review]
Bug 27191: Set focus for cursor to category code input box when creating new patron categories

1-Go to admin>patroncategories>newcategory
2-The category code box should be green and already have the cursor inside without you clicking on it
3-Refresh page to double check the cursor automatically goes to the category code box

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Jonathan Druart 2021-01-22 13:09:32 UTC
Focus must be put using the "focus" class instead.
Comment 6 Katrin Fischer 2022-08-18 20:18:11 UTC
Created attachment 139420 [details] [review]
Bug 27191: Set focus on first input when adding a new patron category

When adding a new patron category, the focus/cursor should be
in the first input field of the form: Category code

To test:
* Add a new patron category in administration > patron categories
  - cursur is in no field
* Apply patch
* Add another new patron category
  - cursor is now in the first input field of the form: Category code
Comment 7 Katrin Fischer 2022-08-18 20:20:39 UTC
I implemented the standard solution for setting the focus using the CSS class
as suggested in comment#5. As both patches were one line fixes mine replaces
Victoria's previous patch. I didn't see a better way, if you prefer this as a
follow-up, please let me know.
Comment 8 ByWater Sandboxes 2022-08-18 20:40:09 UTC
Created attachment 139423 [details] [review]
Bug 27191: Set focus on first input when adding a new patron category

When adding a new patron category, the focus/cursor should be
in the first input field of the form: Category code

To test:
* Add a new patron category in administration > patron categories
  - cursur is in no field
* Apply patch
* Add another new patron category
  - cursor is now in the first input field of the form: Category code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 9 David Nind 2022-08-18 20:45:46 UTC
Created attachment 139426 [details] [review]
Bug 27191: Set focus on first input when adding a new patron category

When adding a new patron category, the focus/cursor should be
in the first input field of the form: Category code

To test:
* Add a new patron category in administration > patron categories
  - cursur is in no field
* Apply patch
* Add another new patron category
  - cursor is now in the first input field of the form: Category code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 Kyle M Hall 2022-09-02 14:44:13 UTC
Created attachment 140159 [details] [review]
Bug 27191: Set focus on first input when adding a new patron category

When adding a new patron category, the focus/cursor should be
in the first input field of the form: Category code

To test:
* Add a new patron category in administration > patron categories
  - cursur is in no field
* Apply patch
* Add another new patron category
  - cursor is now in the first input field of the form: Category code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 11 Tomás Cohen Arazi 2022-09-07 20:46:02 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!