From 4476ec75838a5f927b07b85a2e1884285bf64ec2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 29 Mar 2016 08:14:33 +0100 Subject: [PATCH] Bug 16151: Restore the ability to place holds from lists at the OPAC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index 0149553..ab704ab 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -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; } -- 1.7.10.4