From 0a99e4f7b455d1818d1b98c914bb3e99aa7abf5b Mon Sep 17 00:00:00 2001 From: jeremy breuillard Date: Mon, 21 Mar 2022 15:29:57 +0100 Subject: [PATCH] Bug 29311: Do not allow editing of bibliographic information when entering suggestion from existing bibs This patch changes the behavior of the suggestion form in OPAC. The suggestion form for an existing record has its total of inputs limited, otherwise the inputs are all available. Test plan: 1)OPAC: Login to your OPAC account 2)Choose a record and get onto its details page 3)Click 'suggest for purchase' 4)Notice: all the fields can be modified 5)Apply patch 6)Repeat 2) and 3) or refresh 7)You see that the fields about bibliographic informations are disabled now --- .../bootstrap/en/modules/opac-suggestions.tt | 47 ++++++++++++++++--- opac/opac-suggestions.pl | 14 +++++- 2 files changed, 53 insertions(+), 8 deletions(-) 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 7bee65b938..1477d3776e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-suggestions.tt @@ -113,7 +113,10 @@ [% END %] [% UNLESS ( isbn_hidden )%]
  • - [% IF ( isbn_required ) %] + [% IF ( biblionumber ) %] + + [% isbn | html %] + [% ELSIF ( isbn_required ) %]
    Required
    @@ -125,7 +128,10 @@ [% END %] [% UNLESS ( publishercode_hidden ) %]
  • - [% IF ( publishercode_required ) %] + [% IF ( biblionumber ) %] + + [% publishercode | html %] + [% ELSIF ( publishercode_required ) %]
    Required
    @@ -137,7 +143,10 @@ [% END %] [% UNLESS ( collectiontitle_hidden ) %]
  • - [% IF ( collectiontitle_required ) %] + [% IF ( biblionumber ) %] + + [% collectiontitle | html %] + [% ELSIF ( collectiontitle_required ) %]
    Required
    @@ -149,7 +158,10 @@ [% END %] [% UNLESS ( place_hidden ) %]
  • - [% IF ( place_required ) %] + [% IF ( biblionumber ) %] + + [% place | html %] + [% ELSIF ( place_required ) %]
    Required
    @@ -479,7 +491,6 @@ [% END %] [% END %] [% END # / IF suggestions_loop %] - [% END # IF op_else %] @@ -490,7 +501,31 @@ [% INCLUDE 'opac-bottom.inc' %] [% BLOCK jsinclude %] [% INCLUDE 'datatables.inc' %] -