]> 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:57:29 +0000 (16:57 -0400)
commit91e2c59db4862579af548742ecad5b5f53decac2
tree9ec1678e68acb630d941d4edaba1110566f33f0a
parenta1f3cc9b8db9a0c680c2cb94a5612fda120bb5ed
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