From 6dbebcb0d88f8266737fb40f50bc53e0ca053964 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 5 Nov 2021 10:13:47 +0100 Subject: [PATCH] Bug 29416: (bug 28941 follow-up) Restore suggestion prefill From commit 586bed1319592e05f5dc3acf64a1dba8cae69d6b Bug 28941: Filter suggestion inputs at the OPAC But later in the script we send { suggestion => %$suggestion } to the template and so erase the variable previously passed. Test plan: Login at the OPAC Go to the bibliographic detail page Suggest for purchase => The form must be prefilled! Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit fbd3d2d762cd2889d6207770ebe5f96f34b727c9) Signed-off-by: Fridolin Somers (cherry picked from commit 668c5a9a3542ff17cb15ea73d82936fccadb957c) Signed-off-by: Victor Grousset/tuxayo --- opac/opac-suggestions.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index ccd7871f97..d3d06d301d 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -257,7 +257,7 @@ my @mandatoryfields; } if ( $biblionumber ) { my $biblio = Koha::Biblios->find($biblionumber); - $template->param( + $suggestion = { biblionumber => $biblio->biblionumber, title => $biblio->title, author => $biblio->author, @@ -266,7 +266,7 @@ my @mandatoryfields; publishercode => $biblio->biblioitem->publishercode, collectiontitle => $biblio->biblioitem->collectiontitle, place => $biblio->biblioitem->place, - ); + }; } } -- 2.39.5