diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt index b65e00c984..a507974603 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -78,7 +78,10 @@
  1. - [% IF ( title_required ) %] + [% IF biblionumber %] + + [% title | html %] + [% ELSIF ( title_required ) %] Required @@ -89,7 +92,10 @@
  2. [% UNLESS ( author_hidden ) %]
  3. - [% IF ( author_required ) %] + [% IF biblionumber %] + + [% author | html %] + [% ELSIF ( author_required ) %] Required @@ -115,7 +121,10 @@ [% END %] [% UNLESS ( isbn_hidden )%]
  4. - [% IF ( isbn_required ) %] + [% IF biblionumber %] + + [% isbn | html %] + [% ELSIF ( isbn_required ) %] Required @@ -127,7 +136,10 @@ [% END %] [% UNLESS ( publishercode_hidden ) %]
  5. - [% IF ( publishercode_required ) %] + [% IF biblionumber %] + + [% publishercode | html %] + [% ELSIF ( publishercode_required ) %] Required @@ -139,7 +151,10 @@ [% END %] [% UNLESS ( collectiontitle_hidden ) %]
  6. - [% IF ( collectiontitle_required ) %] + [% IF biblionumber %] + + [% collectiontitle | html %] + [% ELSIF ( collectiontitle_required ) %] Required @@ -151,7 +166,10 @@ [% END %] [% UNLESS ( place_hidden ) %]
  7. - [% IF ( place_required ) %] + [% IF biblionumber %] + + [% place | html %] + [% ELSIF ( place_required ) %] Required diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index 8f99595f1f..a0209b5ac5 100755 --- a/opac/opac-suggestions.pl +++ b/opac/opac-suggestions.pl @@ -192,6 +192,17 @@ if ( $op eq "add_confirm" ) { $suggestion->{suggesteddate} = dt_from_string; $suggestion->{branchcode} = $input->param('branchcode') || C4::Context->userenv->{"branch"}; $suggestion->{STATUS} = 'ASKED'; + if ( $biblionumber ) { + my $biblio = Koha::Biblios->find($biblionumber); + $suggestion->{biblionumber} = $biblio->biblionumber; + $suggestion->{title} = $biblio->title; + $suggestion->{author} = $biblio->author; + $suggestion->{copyrightdate} = $biblio->copyrightdate; + $suggestion->{isbn} = $biblio->biblioitem->isbn; + $suggestion->{publishercode} = $biblio->biblioitem->publishercode; + $suggestion->{collectiontitle} = $biblio->biblioitem->collectiontitle; + $suggestion->{place} = $biblio->biblioitem->place; + } &NewSuggestion($suggestion); $patrons_pending_suggestions_count++;