From 78c8ab3744e0e4982cfa0aeca1acb48fedb39710 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 5 Feb 2024 12:23:55 -0100 Subject: [PATCH] Bug 34478: ILL INTRA: method -> op Signed-off-by: Jonathan Druart --- ill/ill-requests.pl | 22 +++++----- .../prog/en/modules/ill/ill-requests.tt | 40 +++++++++---------- .../intranet-tmpl/prog/js/ill-list-table.js | 4 +- 3 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index 8f1b6551e4..13121167c3 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -51,7 +51,7 @@ unless ( C4::Context->preference('ILLModule') ) { exit; } -my $op = $params->{method} || 'illlist'; +my $op = $params->{op} // $params->{method} // 'illlist'; my ( $template, $patronnumber, $cookie ) = get_template_and_user( { template_name => 'ill/ill-requests.tt', @@ -172,7 +172,7 @@ if ( $backends_available ) { } else { # Backend failure, redirect back to illview print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl' - . '?method=illview' + . '?op=illview' . '&illrequest_id=' . $request->id . '&error=migrate_target' ); @@ -202,7 +202,7 @@ if ( $backends_available ) { handle_commit_maybe($backend_result, $request); } elsif ( $op eq 'cud-cancel' ) { - # Backend 'cud-cancel' method + # Backend 'cancel' method # cancel requires a specific request, so first, find it. my $request = Koha::Illrequests->find($params->{illrequest_id}); my $backend_result = $request->backend_cancel($params); @@ -228,7 +228,7 @@ if ( $backends_available ) { error => 0, status => '', message => '', - method => 'edit_action', + op => 'edit_action', stage => 'init', next => '', value => {} @@ -257,7 +257,7 @@ if ( $backends_available ) { error => 0, status => '', message => '', - method => 'edit_action', + op => 'edit_action', stage => 'commit', next => 'illlist', value => {} @@ -289,7 +289,7 @@ if ( $backends_available ) { } else { print $cgi->redirect( "/cgi-bin/koha/ill/ill-requests.pl?" . - "method=delete_confirm&illrequest_id=" . + "op=delete_confirm&illrequest_id=" . $params->{illrequest_id}); exit; } @@ -357,7 +357,7 @@ if ( $backends_available ) { } print $cgi->redirect( "/cgi-bin/koha/ill/ill-requests.pl?" . - "method=generic_confirm&illrequest_id=" . + "op=generic_confirm&illrequest_id=" . $params->{illrequest_id} . "&error=$error" ); exit; @@ -414,7 +414,7 @@ if ( $backends_available ) { }); $comment->store(); # Redirect to view the whole request - print $cgi->redirect("/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=". + print $cgi->redirect("/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=". scalar $params->{illrequest_id} ); exit; @@ -432,7 +432,7 @@ if ( $backends_available ) { } # Redirect to view the whole request print $cgi->redirect( - "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=". + "/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=". scalar $params->{illrequest_id} . $append ); exit; @@ -471,7 +471,7 @@ sub handle_commit_maybe { # Redirect to a view of the newly created request print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl' - . '?method=illview' + . '?op=illview' . '&illrequest_id=' . $request->id ); exit; @@ -480,7 +480,7 @@ sub handle_commit_maybe { # Redirect to a view of the newly created request print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl' - . '?method=migrate' + . '?op=migrate' . '&stage=emigrate' . '&illrequest_id=' . $request->id ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index a8d20f5e71..9de516de4f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -265,7 +265,7 @@
- + [% IF items.size == 1 %] @@ -273,12 +273,12 @@ [% END %] - Cancel + Cancel
[% END %] [% IF whole.value.check_out_errors.error.STATS %] - Return to request + Return to request [% END %] [% ELSIF whole.stage == 'done_check_out' %]

Item checked out

@@ -296,7 +296,7 @@
- Return to request + Return to request
[% END %] @@ -320,7 +320,7 @@ [% END %] [% IF whole.value.partners %] - [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id=" _ request.illrequest_id %] + [% ill_url = "/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=" _ request.illrequest_id %]
[% INCLUDE 'csrf-token.inc' %]
@@ -357,7 +357,7 @@ - +
@@ -491,11 +491,11 @@
- + - Cancel + Cancel
@@ -505,12 +505,12 @@

Are you sure you wish to delete this request?

[% INCLUDE 'csrf-token.inc' %] - +
- No, do not delete + No, do not delete [% ELSIF query_type == 'illview' %] @@ -554,7 +554,7 @@

Manage ILL request

- + Edit request @@ -591,7 +591,7 @@ @@ -599,7 +599,7 @@ [% ELSIF backends.size == 2 %] [% FOREACH backend IN backends %] [% IF backend != request.backend %] - + [% action.ui_method_name | html %] @@ -607,7 +607,7 @@ [% END %] [% END %] [% ELSIF action.method != 0 %] - + [% action.ui_method_name | html %] @@ -619,7 +619,7 @@
@@ -789,7 +789,7 @@

Add comment

- + [% INCLUDE 'csrf-token.inc' %]
@@ -831,7 +831,7 @@ [% INCLUDE 'csrf-token.inc' %] [% FOREACH key IN whole.keys %] [% value = whole.$key %] - [% IF key != 'method' && key != 'custom_key' && key != 'custom_value' %] + [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' %] [% END %] [% END %] @@ -843,7 +843,7 @@ [% i = i + 1 %] [% END %] - +
@@ -878,7 +878,7 @@
[% FOREACH key IN whole.keys %] [% value = whole.$key %] - [% IF key != 'method' && key != 'custom_key' && key != 'custom_value' %] + [% IF key != 'op' && key != 'method' && key != 'custom_key' && key != 'custom_value' %] [% END %] [% END %] @@ -890,7 +890,7 @@ [% i = i + 1 %] [% END %] - + diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js index 8d564a4ee7..0a26a7209d 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js +++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js @@ -210,7 +210,7 @@ $(document).ready(function() { "orderable": true, "render": function( data, type, row, meta ) { return '' + escape_str(row.id_prefix) + escape_str(data) + ''; } @@ -410,7 +410,7 @@ $(document).ready(function() { "render": function( data, type, row, meta ) { return '' + ill_manage + ''; } -- 2.39.5