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.
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
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>
Works as described.
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>
Focus must be put using the "focus" class instead.
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
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.
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>
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>
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>
Pushed to master for 22.11. Nice work everyone, thanks!