From 0143ed45bb2dad2ccb9e4ad27f5a76d223a96f95 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 1 Feb 2024 12:39:00 +0000 Subject: [PATCH] Bug 34478: Changes for opac-review Signed-off-by: Jonathan Druart --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt | 7 ++++++- opac/opac-review.pl | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt index 698acf4c28..6a8e68d1b2 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt @@ -43,7 +43,12 @@ [% INCLUDE 'csrf-token.inc' %] Comments - [% IF ( reviewid ) %][% END %] + [% IF ( reviewid ) %] + + + [% ELSE %] + + [% END %]
diff --git a/opac/opac-review.pl b/opac/opac-review.pl index 12152d228e..e948e1cf16 100755 --- a/opac/opac-review.pl +++ b/opac/opac-review.pl @@ -32,6 +32,8 @@ my $query = CGI->new; my $biblionumber = $query->param('biblionumber'); my $review = $query->param('review'); my $reviewid = $query->param('reviewid'); +my $op = $query->param('op') // q{}; + my ( $template, $borrowernumber, $cookie ) = get_template_and_user( { template_name => "opac-review.tt", @@ -57,7 +59,7 @@ if( !$biblio ) { $review = $savedreview? $savedreview->review: $review; } -if( !@errors && defined $review ) { +if( $op =~ /^cud-/ && !@errors && defined $review ) { if ($review !~ /\S/) { push @errors, {empty=>1}; } else { -- 2.39.5