Bug 30422: Authorities editor update broke the feature added by Bug 20154
authorOwen Leonard <oleonard@myacpl.org>
Thu, 31 Mar 2022 15:51:14 +0000 (15:51 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Sat, 14 May 2022 01:41:55 +0000 (15:41 -1000)
commit49fec1549bd7d344dc794fab4a550a8fe732d578
tree810df50509ece8228bfb613b5bddcc43ddf58f50
parentc1a485bf1c15c83fc0b09f3b2d143bf7498ea040
Bug 30422: Authorities editor update broke the feature added by Bug 20154

This patch corrects JavaScript in authorities templates so that
clicking "Edit" on the authority detail page will take you to the
authority edit page while keeping the same tab open.

This patch also corrects the JavaScript which should have been
automatically moving the cursor focus to the first form field when
switching tabs in the editor.

This patch also adds the "Section" headings which are present in the
basic cataloging editor but were not added here at the time of the
page's tabs revision.

To test, apply the patch and locate an authority record in your catalog.

- Without changing tabs, choose "Edit record" from the "Edit" dropdown
  menu."
- The authorities editor should load and display the "Section 0" tab.
- Return to the authority detail page and select a tab besides tab 0.
- Click back to tab 0. Editing the record at this point should open the
  editor to Section 0.
- Return to the authority detail page.
- Click any of the numbered tabs besides tab 0.
- Choose "Edit record" from the "Edit" dropdown menu.
- When the authorities edit page loads the same tab should be
  preselected.
- Test that when you switch tabs in the authority editor the cursor
  focus is automatically moved to the first visible input.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/authorities.tt
koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt