From 1ae64b97b39f5554e2d2360de9582a3e445854c5 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=utf8 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 Signed-off-by: Tomas Cohen Arazi Signed-off-by: Brendan A Gallagher --- 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 0149553b34..ab704abe62 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; } -- 2.39.5