From 6719bc6bba3fdc7d0c15618c8e9dc31eb889cdc5 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 2 Feb 2024 14:39:48 -0100 Subject: [PATCH] Bug 34478: ILL OPAC: create => cud-create Signed-off-by: Jonathan Druart --- .../opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 6 +++--- opac/opac-illrequests.pl | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt index 3d39035b7d..81f87c753a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -32,7 +32,7 @@ [% WRAPPER breadcrumb_item %] Interlibrary loan requests [% END %] - [% IF op == 'create' %] + [% IF op == 'cud-create' %] [% WRAPPER breadcrumb_item bc_active= 1 %] New interlibrary loan request [% END %] @@ -72,7 +72,7 @@
ILL module configuration problem. Contact your administrator.
[% ELSE %]
- [% IF op == 'create' %] + [% IF op == 'cud-create' %]

New interlibrary loan request

[% IF stage == 'copyrightclearance' %] [% INCLUDE messages %] @@ -321,7 +321,7 @@
- [% END # / IF op == 'create' %] + [% END # / IF op == 'cud-create' %] [% END # /IF !backends_available %] diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl index 74ec1cad3b..5ce4c86d2e 100755 --- a/opac/opac-illrequests.pl +++ b/opac/opac-illrequests.pl @@ -66,6 +66,10 @@ show_param_deprecation_message('"method" form param is DEPRECATED in favor of "o my $op = $params->{'op'} // $params->{'method'} // 'list'; +show_param_deprecation_message('"create" op is DEPRECATED in favor of "cud-create".') if ( $op eq 'create' ); + +$op = 'cud-create' if $op eq 'create'; + my ( $illrequest_id, $request ); if ( $illrequest_id = $params->{illrequest_id} ) { $request = Koha::Illrequests->find($illrequest_id); @@ -76,7 +80,7 @@ if ( $illrequest_id = $params->{illrequest_id} ) { } } -if ( ( $op eq 'create' || $op eq 'cancreq' || $op eq 'cud-update' ) && !$patron->_result->categorycode->can_place_ill_in_opac ) { +if ( ( $op eq 'cud-create' || $op eq 'cancreq' || $op eq 'cud-update' ) && !$patron->_result->categorycode->can_place_ill_in_opac ) { print $query->redirect('/cgi-bin/koha/errors/403.pl'); exit; } @@ -112,7 +116,7 @@ if ( $op eq 'list' ) { . $illrequest_id . '&message=1' ); exit; -} elsif ( $op eq 'create' ) { +} elsif ( $op eq 'cud-create' ) { if (!$params->{backend}) { my $req = Koha::Illrequest->new; $template->param( -- 2.39.5