From e290d8d02abbbc6c5160b02dee4dede2fa059bf4 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 --- 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 6f6e91b45a..9c965041ce 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -254,7 +254,7 @@ my @mandatoryfields; } if ( $biblionumber ) { my $biblio = Koha::Biblios->find($biblionumber); - $template->param( + $suggestion = { biblionumber => $biblio->biblionumber, title => $biblio->title, author => $biblio->author, @@ -263,7 +263,7 @@ my @mandatoryfields; publishercode => $biblio->biblioitem->publishercode, collectiontitle => $biblio->biblioitem->collectiontitle, place => $biblio->biblioitem->place, - ); + }; } } -- 2.39.5