]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1690468: fix Exclude Electronic Resources checkbox with advanced search limiters
authorJeff Davis <jdavis@sitka.bclibraries.ca>
Thu, 18 May 2017 22:43:53 +0000 (15:43 -0700)
committerKathy Lussier <klussier@masslnc.org>
Fri, 19 May 2017 20:56:11 +0000 (16:56 -0400)
commit4b72de67dee5cc3144a5f6fa2223e08ddd00c869
tree74ce3a35667233b3d4697e2f2852aa2e9050b00b
parent391d7edf68bc7a67b69620ef74db36b7a79a9747
LP#1690468: fix Exclude Electronic Resources checkbox with advanced search limiters

When advanced search limiters are applied, you cannot successfully
uncheck the Exclude Electronic Resources checkbox.  When you uncheck it,
your current search is reloaded, but e-resources are still excluded
(and the box remains checked).

When you use the checkbox to exclude e-resources, the search form on the
results page contains a hidden input element:

<input type="hidden" name="fi:-search_format" value="electronic" />

This commit uses Javascript to remove that element from the search form
when the box is unchecked, before submitting the search.

Test plan:

[1] Enable the "Exclude Electronic Resources" checkbox in config.tt2.
[2] Do an advanced search, applying at least one search filter (e.g.
    Language = "English").
[3] On the search results page, check the Exclude Electronic Resources
    checkbox.  This repeats your search, excluding e-resources.
[4] Uncheck the Exclude Electronic Resources box.  Your search is
    repeated, but e-resources are still excluded and the box remains
    checked on your new results page.
[5] Apply this fix.
[6] Refresh the page or clear your browser cache, and try to uncheck the
    Exclude Electronic Resources box again.  This time, it should work:
    e-resources will no longer be excluded, and the box is unchecked
    when your new results page loads.

Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/web/js/ui/default/opac/simple.js