View | Details | Raw Unified | Return to bug 20548
Collapse All | Expand All

(-)a/Koha/Illrequest.pm (-16 / +17 lines)
Lines 600-622 sub backend_create { Link Here
600
    my ( $self, $params ) = @_;
600
    my ( $self, $params ) = @_;
601
601
602
    # Establish whether we need to do a generic copyright clearance.
602
    # Establish whether we need to do a generic copyright clearance.
603
    if ( ( !$params->{stage} || $params->{stage} eq 'init' )
603
    if ($params->{opac}) {
604
             && C4::Context->preference("ILLModuleCopyrightClearance") ) {
604
        if ( ( !$params->{stage} || $params->{stage} eq 'init' )
605
        return {
605
                && C4::Context->preference("ILLModuleCopyrightClearance") ) {
606
            error   => 0,
606
            return {
607
            status  => '',
607
                error   => 0,
608
            message => '',
608
                status  => '',
609
            method  => 'create',
609
                message => '',
610
            stage   => 'copyrightclearance',
610
                method  => 'create',
611
            value   => {
611
                stage   => 'copyrightclearance',
612
                backend => $self->_backend->name
612
                value   => {
613
            }
613
                    backend => $self->_backend->name
614
        };
614
                }
615
    } elsif (     defined $params->{stage}
615
            };
616
               && $params->{stage} eq 'copyrightclearance' ) {
616
        } elsif (     defined $params->{stage}
617
        $params->{stage} = 'init';
617
                && $params->{stage} eq 'copyrightclearance' ) {
618
            $params->{stage} = 'init';
619
        }
618
    }
620
    }
619
620
    # First perform API action, then...
621
    # First perform API action, then...
621
    my $args = {
622
    my $args = {
622
        request => $self,
623
        request => $self,
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt (-13 / +1 lines)
Lines 315-333 Link Here
315
315
316
                [% IF query_type == 'create' %]
316
                [% IF query_type == 'create' %]
317
                    <h1>New ILL request</h1>
317
                    <h1>New ILL request</h1>
318
                    [% IF whole.stage == 'copyrightclearance' %]
318
                    [% PROCESS $whole.template %]
319
                        <div>
320
                            <p>
321
                                [% Koha.Preference('ILLModuleCopyrightClearance') %]
322
                            </p>
323
                            <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]"
324
                               class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a>
325
                            <a href="/cgi-bin/koha/ill/ill-requests.pl"
326
                               class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a>
327
                        </div>
328
                    [% ELSE %]
329
                        [% PROCESS $whole.template %]
330
                    [% END %]
331
319
332
                [% ELSIF query_type == 'confirm' %]
320
                [% ELSIF query_type == 'confirm' %]
333
                    <h1>Confirm ILL request</h1>
321
                    <h1>Confirm ILL request</h1>
(-)a/opac/opac-illrequests.pl (-1 / +1 lines)
Lines 111-116 if ( $op eq 'list' ) { Link Here
111
        $params->{cardnumber} = Koha::Patrons->find({
111
        $params->{cardnumber} = Koha::Patrons->find({
112
            borrowernumber => $loggedinuser
112
            borrowernumber => $loggedinuser
113
        })->cardnumber;
113
        })->cardnumber;
114
        $params->{opac} = 1;
114
        my $backend_result = $request->backend_create($params);
115
        my $backend_result = $request->backend_create($params);
115
        $template->param(
116
        $template->param(
116
            media       => [ "Book", "Article", "Journal" ],
117
            media       => [ "Book", "Article", "Journal" ],
117
- 

Return to bug 20548