LP#172113 - Patron Search Form Reset Enhancement user/stompro/lp1721131_patron_search_reset
authorJosh Stompro <stompro@stompro.org>
Fri, 28 Feb 2020 16:36:22 +0000 (10:36 -0600)
committerJosh Stompro <stompro@stompro.org>
Fri, 28 Feb 2020 16:36:22 +0000 (10:36 -0600)
commit532e67d8b943a638672f8d64e7bb8869e9f46893
treef84f4d284ac7f85bb9642738c6b5eb4cb6b3b2ca
parentb50528f4b0a66f9f6b72e3a1de4a7e6d920908a6
LP#172113 - Patron Search Form Reset Enhancement

The patron search "Clear Form" button clears the value
from the Home Library selector and sets it to undefined.

This can cause some strange results for subsequent
searches, where the workstation ou can get inserted
unintentionally.

This branch changes the Clear Form input from a reset button to
just a button, so the clearForm() function does all the work.

The clearForm() function is changed to set the Home Lib to cons
and the Include Inactive to true, so a reset results in the broadest
search possible.

Testing Notes:
1. Clear browser pref for eg.circ.patron.search.ou in admin ->
  workstation -> stored preferences.
2. Load patron search.
3. Press clear form. (Home library gets cleared)
4. Add some search args and perform a search that returns some patrons.
5. Open a patron.
6. Click on patron search in upper right corner to return to results.
7. Note that home library is now set to workstation ou.

After fix applied.

Perform above steps, but note that clear form sets Home Lib to cons,
and doesn't unset Include Inactive.

Signed-off-by: Josh Stompro <stompro@stompro.org>
Open-ILS/src/templates/staff/share/t_patron_search_form.tt2
Open-ILS/web/js/ui/default/staff/services/patron_search.js