When you add a new authorised value or a new item type the focus is in no field on the page. I think it would be nice if you could start writing directly into the first field of the form after clicking the 'new ...' button.
Created attachment 13685 [details] [review] Bug 9137 - Focus when editing/adding new itemtypes/authorised values This patch adds the "focus" class to the relevant inputs so that the global staff client JS will move the focus to those fields. Logic in the authorised_values template puts the focus on the correct field whether you're adding a new category, a new value, or performing an edit. To test, try the following operations: - add an itemtype - edit an itemtype - add an authorised value category - add an authorised value value - edit an authorised value value In all cases the focus should automatically be in the first form field.
I followed the test plan, and found that the focus is in the first field on the page by default without having to click anywhere. Very helpful, and works as advertised! (I had to add a "patch complexity" to this enhancement request in order to sign it off - hopefully "trivial" is ok, but if not, someone else please change it!)
Created attachment 13695 [details] [review] [Signed off] Bug 9137 - Focus when editing/adding new itemtypes/authorised values This patch adds the "focus" class to the relevant inputs so that the global staff client JS will move the focus to those fields. Logic in the authorised_values template puts the focus on the correct field whether you're adding a new category, a new value, or performing an edit. To test, try the following operations: - add an itemtype - edit an itemtype - add an authorised value category - add an authorised value value - edit an authorised value value In all cases the focus should automatically be in the first form field. Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com>
Created attachment 13721 [details] [review] [SIGNED-OFF] Bug 9137 - Focus when editing/adding new itemtypes/authorised values This patch adds the "focus" class to the relevant inputs so that the global staff client JS will move the focus to those fields. Logic in the authorised_values template puts the focus on the correct field whether you're adding a new category, a new value, or performing an edit. To test, try the following operations: - add an itemtype - edit an itemtype - add an authorised value category - add an authorised value value - edit an authorised value value In all cases the focus should automatically be in the first form field. Signed-off-by: Melia Meggs <melia@test.bywatersolutions.com> Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> All tests pass and works nicely.
This patch has been pushed to master.
Pushed to 3.10.x, will be in 3.10.1
Pushed to 3.8.x will be in 3.8.8