@@ -, +, @@ --------- - Ensure you have at least one ILL backend available: https://wiki.koha-community.org/wiki/ILL_backends - Ensure you have the "ILLModule" preference enabled - Add some text to the "ILLModuleCopyrightClearance" preference - As an OPAC user make an ILL request: - Navigate to a search results page in the catalog - Click the "Make an Interlibrary Loan request" link at the bottom - Choose "Create a new request", then select a backend - TEST: Check the text you added earlier is displayed with buttons for agreeing or disagreeing - As a staff user, select the "ILL requests" button on the front page of - Choose "Create a new request", then select a backend - TEST: Check that you are NOT prompted to agree to the text you added earlier --- Koha/Illrequest.pm | 33 +++++++++++----------- .../prog/en/modules/ill/ill-requests.tt | 14 +-------- opac/opac-illrequests.pl | 1 + 3 files changed, 19 insertions(+), 29 deletions(-) --- a/Koha/Illrequest.pm +++ a/Koha/Illrequest.pm @@ -600,23 +600,24 @@ sub backend_create { my ( $self, $params ) = @_; # Establish whether we need to do a generic copyright clearance. - if ( ( !$params->{stage} || $params->{stage} eq 'init' ) - && C4::Context->preference("ILLModuleCopyrightClearance") ) { - return { - error => 0, - status => '', - message => '', - method => 'create', - stage => 'copyrightclearance', - value => { - backend => $self->_backend->name - } - }; - } elsif ( defined $params->{stage} - && $params->{stage} eq 'copyrightclearance' ) { - $params->{stage} = 'init'; + if ($params->{opac}) { + if ( ( !$params->{stage} || $params->{stage} eq 'init' ) + && C4::Context->preference("ILLModuleCopyrightClearance") ) { + return { + error => 0, + status => '', + message => '', + method => 'create', + stage => 'copyrightclearance', + value => { + backend => $self->_backend->name + } + }; + } elsif ( defined $params->{stage} + && $params->{stage} eq 'copyrightclearance' ) { + $params->{stage} = 'init'; + } } - # First perform API action, then... my $args = { request => $self, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -315,19 +315,7 @@ [% IF query_type == 'create' %]

New ILL request

- [% IF whole.stage == 'copyrightclearance' %] -
-

- [% Koha.Preference('ILLModuleCopyrightClearance') %] -

- Yes - No -
- [% ELSE %] - [% PROCESS $whole.template %] - [% END %] + [% PROCESS $whole.template %] [% ELSIF query_type == 'confirm' %]

Confirm ILL request

--- a/opac/opac-illrequests.pl +++ a/opac/opac-illrequests.pl @@ -111,6 +111,7 @@ if ( $op eq 'list' ) { $params->{cardnumber} = Koha::Patrons->find({ borrowernumber => $loggedinuser })->cardnumber; + $params->{opac} = 1; my $backend_result = $request->backend_create($params); if ($backend_result->{stage} eq 'copyrightclearance') { $template->param( --