Koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-box.inc
Owen Leonard de4434bd4a Bug 30640: Focus does not always move to correct search header form field
This patch updates the staff interface's global JavaScript to
accommodate changes in the way focus is being handled after the jQuery
upgrade (see: https://github.com/jquery/jquery/issues/4950).

The "focus" class is removed from search header include files so that
there isn't a contradiction between which form field has the focus class
and which form field is displayed in the active tab.

To test, apply the patch and view various pages in the staff interface.

- On pages where focus is not being directed to a form field within the
  main content of the page, the form field in the active search header
  tab should have focus on page load:

  - Patron details
  - System preferences
  - Cities and towns

  Also test pages where a tab other than the first one is preselected:

  - Bibliographic details page
  - Patron lists

  On these pages, focus should move to the active tab's form field when
  you switch tabs.

- On pages where focus is being sent to another form field, it should
  work correctly:

  - Patrons home page
  - Check in
  - Acquisitions home page

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-05-18 17:22:08 -10:00

24 lines
1.3 KiB
HTML

[% IF ( CAN_user_circulate_circulate_remaining_permissions ) %]
<div id="circ_search" class="residentsearch">
<form action="/cgi-bin/koha/circ/circulation.pl" id="patronsearch" method="post">
<label class="tip" for="findborrower">Enter patron card number or partial name:</label>
[% IF ( PatronAutoComplete ) %]
<div class="autocomplete">
<input autocomplete="off" id="findborrower" name="findborrower" size="40" class="head-searchbox" type="text" />
<input id="autocsubmit" type="submit" class="submit" value="Submit" />
[% IF ( stickyduedate ) %]
<input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
[% END %]
</div>
[% ELSE %]
<input id="findborrower" name="findborrower" size="40" class="head-searchbox" type="text" autocomplete="off" />
[% IF ( stickyduedate ) %]
<input type="hidden" name="duedatespec" value="[% duedatespec | html %]" />
<input type="hidden" name="stickyduedate" value="[% stickyduedate | html %]" />
[% END %]
<input value="Submit" class="submit" type="submit" />
[% END %]
</form>
</div>
[% END %]