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 47ff5eb5df..0d5f4a86d4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -84,7 +84,10 @@ [% END %]
  • - [% IF ( title_required ) %] + [% IF biblionumber %] + + [% title | html %] + [% ELSIF ( title_required ) %]
    Required
    @@ -95,7 +98,10 @@
  • [% UNLESS ( author_hidden ) %]
  • - [% IF ( author_required ) %] + [% IF biblionumber %] + + [% author | html %] + [% ELSIF ( author_required ) %]
    Required
    @@ -108,21 +114,28 @@ [% UNLESS ( copyrightdate_hidden )%]
  • - [% IF ( copyrightdate_required ) %] + [% IF biblionumber %] + + [% copyrightdate | html %] + [% ELSIF ( copyrightdate_required ) %]
    Required
    + Copyright or publication year, for example: 2022 [% ELSE %] + Copyright or publication year, for example: 2022 [% END %] - Copyright or publication year, for example: 2022
  • [% END %] [% UNLESS ( isbn_hidden or Koha.Preference('OPACSuggestionAutoFill') ) %]
  • - [% IF ( isbn_required ) %] + [% IF biblionumber %] + + [% isbn | html %] + [% ELSIF ( isbn_required ) %]
    Required
    @@ -134,7 +147,10 @@ [% END %] [% UNLESS ( publishercode_hidden ) %]
  • - [% IF ( publishercode_required ) %] + [% IF biblionumber %] + + [% publishercode | html %] + [% ELSIF ( publishercode_required ) %]
    Required
    @@ -146,7 +162,10 @@ [% END %] [% UNLESS ( collectiontitle_hidden ) %]
  • - [% IF ( collectiontitle_required ) %] + [% IF biblionumber %] + + [% collectiontitle | html %] + [% ELSIF ( collectiontitle_required ) %]
    Required
    @@ -158,7 +177,10 @@ [% END %] [% UNLESS ( place_hidden ) %]
  • - [% IF ( place_required ) %] + [% IF biblionumber %] + + [% place | html %] + [% ELSIF ( place_required ) %]
    Required
    diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl index fcc95801aa..cc4e921a7b 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++;