]> git.koha-community.org Git - koha.git/commit
Bug 31413: Set focus for cursor to Selector when adding a new audio alert
authorOwen Leonard <oleonard@myacpl.org>
Mon, 6 Feb 2023 13:10:30 +0000 (13:10 +0000)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 24 Feb 2023 20:52:27 +0000 (17:52 -0300)
commit7c8434553a29b177b879f958c59487cf854c3c13
treee08cc5c3adc6de6ee0b202211f487ee8b630f1ad
parent3eea589ca10956fb18ec53f32c93cfe5defb9756
Bug 31413: Set focus for cursor to Selector when adding a new audio alert

This patch adds a step to the process of displaying the new audio alert
form so that focus will be set to the first field when the form has
finished appearing. The typical "focus" class only works on elements
which are present in the initial DOM when the page is displayed.

To test, apply the patch and go to Administration -> Audio alerts.

Click the "New alert" button. When the form appears cursor focus should
be on the "Selector" field.

Also test the edit process: When editing an existing alert there should
not be automatic cursor focus.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
koha-tmpl/intranet-tmpl/prog/js/audio_alerts.js