When creating a new debit type in administration, it would be nice if the cursor was in the first form field "Debit typecode ". See bug 27192 for a similar one.
Created attachment 115272 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should) Sponsored by Catalyst IT
Created attachment 115273 [details] [review] Bug 27457: Set cursor focus to debit type code field when creating new debit type Test Plan: 1. Go to Administration 2. Go to Debit Types 3. Go to New Debit Type (Cursor shouldn't focus on 'Debit Type Code') 5. Apply Patch 6. Repeat steps 1-3 (Cursor should automatically focus on the 'Debit Type Code' field)
There are 2 patches here, obsoleting the second one.
Thanks for your patch Catherine. A small note, try to not add unnecessary whitespace changes like: - $(document).ready(function() { + $(document).ready(function(){
Hi Mazen, A minor point about consistency, whilst your patch does indeed work, we actually have a class hooked up already to achieve this.. so; rather than requiring the addition of the javascript you've added, you could just add a 'focus' class to the input in question instead.. which is a little terser and the preferred option.
(In reply to Martin Renvoize from comment #5) > Hi Mazen, > > A minor point about consistency, whilst your patch does indeed work, we > actually have a class hooked up already to achieve this.. so; rather than > requiring the addition of the javascript you've added, you could just add a > 'focus' class to the input in question instead.. which is a little terser > and the preferred option. I'll try to keep that in mind. Thanks, Martin!
Created attachment 115346 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should) Sponsored by Catalyst IT
Created attachment 115353 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should)
Created attachment 115354 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should) Sponsored by Catalyst IT
Hi Catherine and Mazen, could you please take a look at the solution from bug 27192 I posted in the first comment? I think this should work here too and will not require additional Javascript, just adding a class to the input element.
Created attachment 115461 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should) Sponsored by Catalyst IT
Created attachment 115478 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should) Sponsored by Catalyst IT Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Created attachment 115518 [details] [review] Bug 27457: Set focus for cursor to Debit type code field Test Plan: 1.Click administration 2.Click debit types 3.Click new debit type 4.Check if the cursor is in the first form field (it shouldn't) 5.Add patch 6.Repeat steps 1-3 7.Check if the cursor is in the first form field (it should) Sponsored by Catalyst IT Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Excellent work everyone, thanks. Passing QA
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.03
Pushed to 20.05.x for 20.05.09
Backported: Pushed to 19.11.x branch for 19.11.15