From ed761bc816bc78ccd557dea4c13e1499ebf3f632 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Séverine QUEUNE --- .../bootstrap/en/modules/opac-suggestions.tt | 45 ++++++++++++++++--- opac/opac-suggestions.pl | 14 +++++- 2 files changed, 52 insertions(+), 7 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 0eb939e176..7668aa47e2 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
    @@ -480,7 +492,6 @@ [% END %] [% END %] [% END # / IF suggestions_loop %] - [% END # IF op_else %] @@ -492,6 +503,30 @@ [% BLOCK jsinclude %] [% INCLUDE 'datatables.inc' %]