Bug 27458 - Set focus for cursor to Credit type code field when creating new credit type
Summary: Set focus for cursor to Credit type code field when creating new credit type
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Amy King
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2021-01-17 16:16 UTC by Katrin Fischer
Modified: 2021-12-13 21:09 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.03,20.05.09


Attachments
Bug 27458 Focus cursor to credit type code when creating new type. (1.29 KB, patch)
2021-01-19 01:35 UTC, Amy King
Details | Diff | Splinter Review
Bug 27458: Sets cursor to focus credit type code when creating new type. (1.29 KB, patch)
2021-01-19 20:19 UTC, Amy King
Details | Diff | Splinter Review
Bug 27458: cursor focueses to credit type field using class="focus" (1.75 KB, patch)
2021-01-20 01:01 UTC, Amy King
Details | Diff | Splinter Review
Bug 27458: cursor focueses to credit type field class="required focus" (1.74 KB, patch)
2021-01-20 20:57 UTC, Amy King
Details | Diff | Splinter Review
Bug 27458: cursor focueses to credit type field class="required focus" (1.81 KB, patch)
2021-01-20 22:11 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27458: cursor focueses to credit type field class="required focus" (1.87 KB, patch)
2021-01-21 10:40 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27458: Set focus for cursor to Credit type code field (1.89 KB, patch)
2021-01-21 14:43 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2021-01-17 16:16:28 UTC
When creating a new credit type in administration, it would be nice if the cursor was in the first form field "Credit type code ".

See bug 27192 for a similar one.
Comment 1 Amy King 2021-01-19 01:35:36 UTC
Created attachment 115276 [details] [review]
Bug 27458 Focus cursor to credit type code when creating new type.

Test plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field.
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credit type code field.
Comment 2 Jonathan Druart 2021-01-19 09:07:06 UTC
Hi Amy, thanks for your patch!

The commit message must start with "Bug 27458: ". Can you resubmit please?
Comment 3 Amy King 2021-01-19 20:19:19 UTC
Created attachment 115344 [details] [review]
Bug 27458: Sets cursor to focus credit type code when creating new type.

Test plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field.
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credit type code field.
Comment 4 Katrin Fischer 2021-01-19 23:09:42 UTC
Hi Amy, 

could you take a look at the bug linked in the first comment? The solution there is a little different using a class="focus" to the input element. I think that would be a more standardized way of doing this!

There are also 2 patches here currently, you can obsolete them by going on details > edit details > obsolete or by using git bz. :)
Comment 5 Amy King 2021-01-20 01:01:39 UTC
Created attachment 115377 [details] [review]
Bug 27458: cursor focueses to credit type field using class="focus"

Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note hoe the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field
Comment 6 Barbara Johnson 2021-01-20 17:42:02 UTC
I have tried this twice and am not seeing the cursor automatically placed in the credit type code field.
Comment 7 Owen Leonard 2021-01-20 19:05:31 UTC
There is already a class attribute on that <input> tag, so the new "focus" value should be added to it, e.g. 'class="required focus"'
Comment 8 Amy King 2021-01-20 20:57:37 UTC
Created attachment 115459 [details] [review]
Bug 27458: cursor focueses to credit type field class="required focus"

Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field
Comment 9 PTFS Europe Sandboxes 2021-01-20 22:11:19 UTC
Created attachment 115468 [details] [review]
Bug 27458: cursor focueses to credit type field class="required focus"

Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 10 Barbara Johnson 2021-01-20 22:18:59 UTC
It works!
Comment 11 Martin Renvoize 2021-01-21 10:40:15 UTC
Created attachment 115522 [details] [review]
Bug 27458: cursor focueses to credit type field class="required focus"

Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2021-01-21 10:40:44 UTC
Great work Amy, thanks for your contribution.

All works as expected, Passing QA
Comment 13 Jonathan Druart 2021-01-21 14:43:13 UTC
Created attachment 115554 [details] [review]
Bug 27458: Set focus for cursor to Credit type code field

Test Plan:
Before applying patch
1. Click on Administration
2. Scroll down to Accounting and click on Credit types
3. Click New credit type
4. Note how the cursor does not focus on Credit type code field
5. Apply patch
6. Repeat steps 1-3
7. Note how the cursor now focuses on Credity type code field

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

JD amended patch: Edit commit title
Comment 14 Jonathan Druart 2021-01-21 15:25:42 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 15 Fridolin Somers 2021-01-25 15:29:23 UTC
Pushed to 20.11.x for 20.11.03
Comment 16 Andrew Fuerste-Henry 2021-02-03 21:43:50 UTC
Pushed to 20.05.x for 20.05.09
Comment 17 Victor Grousset/tuxayo 2021-02-03 22:48:57 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.
Comment 18 Victor Grousset/tuxayo 2021-02-03 22:52:45 UTC
> Feel free to ask if it's needed.

actually credit_types.tt didn't exist in 19.11