Bug 28518: Display missing inputs for "Return to the last advanced search"
When more than 3 search terms are passed on the advanced search form,
the "Return to the last advanced search" feature does not display them.
Test plan:
Perform an adv search at the OPAC, enter more than 3 terms, launch the
search, click the "Return to the last advanced search" link and confirm
that all the entries are there.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 75d67d46ce)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
a0771ac4b2
commit
a0bd7d7c5a
|
|
@ -462,6 +462,11 @@ $(document).ready(function() {
|
|||
|
||||
[% IF ( ReturnToSearch ) %]
|
||||
if (form_serialized = jQuery.cookie("form_serialized")) {
|
||||
// Add missing term inputs if there were more than 3
|
||||
var count = (form_serialized.match(/&q=/g) || []).length;
|
||||
for(var i = 3 ; i < count ; i++) {
|
||||
$("a.ButtonPlus:last").click();
|
||||
}
|
||||
$('#advsearch form').deserialize(form_serialized);
|
||||
}
|
||||
if (form_serialized_limits = jQuery.cookie("form_serialized_limits")) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue