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 316-334 Link Here
316
316
317
                [% IF query_type == 'create' %]
317
                [% IF query_type == 'create' %]
318
                    <h1>New ILL request</h1>
318
                    <h1>New ILL request</h1>
319
                    [% IF whole.stage == 'copyrightclearance' %]
319
                    [% PROCESS $whole.template %]
320
                        <div>
321
                            <p>
322
                                [% Koha.Preference('ILLModuleCopyrightClearance') %]
323
                            </p>
324
                            <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]"
325
                               class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a>
326
                            <a href="/cgi-bin/koha/ill/ill-requests.pl"
327
                               class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a>
328
                        </div>
329
                    [% ELSE %]
330
                        [% PROCESS $whole.template %]
331
                    [% END %]
332
320
333
                [% ELSIF query_type == 'confirm' %]
321
                [% ELSIF query_type == 'confirm' %]
334
                    <h1>Confirm ILL request</h1>
322
                    <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