Bug 27193 - Set focus for cursor to patron attribute type code input box when creating new patron attributes
Summary: Set focus for cursor to patron attribute type code input box when creating ne...
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: 31411
  Show dependency treegraph
 
Reported: 2020-12-10 16:15 UTC by Barbara Johnson
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 27193 - Set focus for cursor to patron attribute type code input box when creating new patron attributes (1.43 KB, patch)
2021-01-19 01:31 UTC, Ella
Details | Diff | Splinter Review
Bug 27193: Set focus for cursor to patron attribute type code input box when creating new patron attributes (1.43 KB, patch)
2021-01-19 20:23 UTC, Ella
Details | Diff | Splinter Review
Bug 27195: Set focus for cursor to city input box when creating new cities (1.44 KB, patch)
2021-01-19 21:48 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27193 - Set focus for cursor to patron attribute type code input box when creating new patron attributes (1.49 KB, patch)
2021-01-19 21:48 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27193: Set focus for cursor to patron attribute type code input box when creating new patron attributes (1.56 KB, patch)
2021-01-21 19:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 27193: Set focus on first input when adding a new patron attribute (1.56 KB, patch)
2022-08-18 19:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27193: Set focus on first input when adding a new patron attribute (1.62 KB, patch)
2022-08-18 20:42 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 27193: Set focus on first input when adding a new patron attribute (1.67 KB, patch)
2022-09-02 14:40 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:15:16 UTC
When adding a new patron attribute type on patron-attr-types.pl you have to click in the patron attribute type 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 patron attribute type code input box so that you could just begin typing and eliminate an extra click.
Comment 1 Ella 2021-01-19 01:31:08 UTC
Created attachment 115274 [details] [review]
Bug 27193 - Set focus for cursor to patron attribute type code input box when creating new patron attributes

1. (Before attaching the patch) Go into administration
2. Go to Patron attribute types - then 'New patron attribute type'
3. Without the patch, the cursor should not automatically focus on the
first container 'Patron attribute type code'
4. Install patch
5. Redo steps 1&2
6. If the patch worked, then the cursor should automatically focus to
the first container 'Patron attribute type code'

Sponsored.by: Catalyst IT
Comment 2 Jonathan Druart 2021-01-19 09:06:02 UTC
Hello Ella,
The commit message of your patch must start with "Bug 27193: ". Can you resubmit please?
Comment 3 Ella 2021-01-19 20:23:09 UTC
Created attachment 115347 [details] [review]
Bug 27193: Set focus for cursor to patron attribute type code input box when creating new patron attributes

1. (Before attaching the patch) Go into administration
2. Go to Patron attribute types - then 'New patron attribute type'
3. Without the patch, the cursor should not automatically focus on the
first container 'Patron attribute type code'
4. Install patch
5. Redo steps 1&2
6. If the patch worked, then the cursor should automatically focus to
the first container 'Patron attribute type code'

Sponsored.by: Catalyst IT
Comment 4 PTFS Europe Sandboxes 2021-01-19 21:48:38 UTC
Created attachment 115366 [details] [review]
Bug 27195: Set focus for cursor to city input box when creating new cities

(Before downloading the patch)
    1. Go to administration
    2. Go to cities
    3. Click on add new city
    4. See if the cursor automatically focuses to the first city
    container (It shouldn't).
    5. Apply patch
    6. Repeat steps 1-4
    7. If the cursor automatically focuses in the first city container,
    the patch has worked!

Sponsored-by: Catalyst IT

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

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 5 PTFS Europe Sandboxes 2021-01-19 21:48:41 UTC
Created attachment 115367 [details] [review]
Bug 27193 - Set focus for cursor to patron attribute type code input box when creating new patron attributes

1. (Before attaching the patch) Go into administration
2. Go to Patron attribute types - then 'New patron attribute type'
3. Without the patch, the cursor should not automatically focus on the
first container 'Patron attribute type code'
4. Install patch
5. Redo steps 1&2
6. If the patch worked, then the cursor should automatically focus to
the first container 'Patron attribute type code'

Sponsored.by: Catalyst IT

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 6 Kyle M Hall 2021-01-21 19:58:09 UTC
Created attachment 115616 [details] [review]
Bug 27193: Set focus for cursor to patron attribute type code input box when creating new patron attributes

1. (Before attaching the patch) Go into administration
2. Go to Patron attribute types - then 'New patron attribute type'
3. Without the patch, the cursor should not automatically focus on the
first container 'Patron attribute type code'
4. Install patch
5. Redo steps 1&2
6. If the patch worked, then the cursor should automatically focus to
the first container 'Patron attribute type code'

Sponsored.by: Catalyst IT

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Jonathan Druart 2021-01-22 13:09:08 UTC
Focus must be put using the "focus" class instead.
Comment 8 Katrin Fischer 2022-08-18 19:49:14 UTC
Created attachment 139416 [details] [review]
Bug 27193: Set focus on first input when adding a new patron attribute

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

To test:
* Add a new patron attribute - cursur is in no field
* Apply patch
* Add another new patron attribute - cursor is now in
  the first input field: Patron attribute type code
Comment 9 Katrin Fischer 2022-08-18 19:52:18 UTC
I've implemented the solution from comment#7 using the CSS class. As this is a one line change all in all it replaces Ella's patch. I am sorry to lose the contribution, but not sure about a better option here. :(
Comment 10 ByWater Sandboxes 2022-08-18 20:42:02 UTC
Created attachment 139424 [details] [review]
Bug 27193: Set focus on first input when adding a new patron attribute

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

To test:
* Add a new patron attribute - cursur is in no field
* Apply patch
* Add another new patron attribute - cursor is now in
  the first input field: Patron attribute type code

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 11 Kyle M Hall 2022-09-02 14:40:30 UTC
Created attachment 140158 [details] [review]
Bug 27193: Set focus on first input when adding a new patron attribute

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

To test:
* Add a new patron attribute - cursur is in no field
* Apply patch
* Add another new patron attribute - cursor is now in
  the first input field: Patron attribute type code

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

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

Nice work everyone, thanks!