Bug 16151: Restore the ability to place holds from lists at the OPAC

This patch fixes a bug introduced by bug 14544.
Holds can not be placed from lists at the OPAC, the action results in a
crash:
Can't call method "field" on an undefined value at
/home/koha/src/C4/Items.pm line 1504.
 at /home/koha/src/opac/opac-reserve.pl line 601

Before 14544, the checkboxes were named 'ACT-$BIBNUM', something like
REM-4242. Now we can retrieve the biblionumber from the value.

Test plan:
Select a public list
check some titles and click on the 'Place hold' link
you should able to process the reservation

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit 1ae64b97b3)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Jonathan Druart 2016-03-29 08:14:33 +01:00 committed by Julian Maurice
parent 2159e7d880
commit 99d07437e1
1 changed files with 1 additions and 3 deletions

View File

@ -764,9 +764,7 @@ var MSG_CONFIRM_REMOVE_SHARE = _("Are you sure you want to remove this share?");
} else {
var bibs = "";
$(checkedBoxes).each(function(){
var name = $(this).attr("name");
bib = name.substr(4);
bibs += bib + "/";
bibs += $(this).val() + "/";
});
document.location = "/cgi-bin/koha/opac-reserve.pl?biblionumbers="+bibs;
}