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 317-335 Link Here
317
317
318
                [% IF query_type == 'create' %]
318
                [% IF query_type == 'create' %]
319
                    <h1>New ILL request</h1>
319
                    <h1>New ILL request</h1>
320
                    [% IF whole.stage == 'copyrightclearance' %]
320
                    [% PROCESS $whole.template %]
321
                        <div>
322
                            <p>
323
                                [% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
324
                            </p>
325
                            <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend | html %]"
326
                               class="btn btn-sm btn-default btn-group"><i class="fa fa-check">Yes</i></a>
327
                            <a href="/cgi-bin/koha/ill/ill-requests.pl"
328
                               class="btn btn-sm btn-default btn-group"><i class="fa fa-times">No</i></a>
329
                        </div>
330
                    [% ELSE %]
331
                        [% PROCESS $whole.template %]
332
                    [% END %]
333
321
334
                [% ELSIF query_type == 'confirm' %]
322
                [% ELSIF query_type == 'confirm' %]
335
                    <h1>Confirm ILL request</h1>
323
                    <h1>Confirm ILL request</h1>
(-)a/opac/opac-illrequests.pl (-1 / +1 lines)
Lines 112-117 if ( $op eq 'list' ) { Link Here
112
        $params->{cardnumber} = Koha::Patrons->find({
112
        $params->{cardnumber} = Koha::Patrons->find({
113
            borrowernumber => $loggedinuser
113
            borrowernumber => $loggedinuser
114
        })->cardnumber;
114
        })->cardnumber;
115
        $params->{opac} = 1;
115
        my $backend_result = $request->backend_create($params);
116
        my $backend_result = $request->backend_create($params);
116
        if ($backend_result->{stage} eq 'copyrightclearance') {
117
        if ($backend_result->{stage} eq 'copyrightclearance') {
117
            $template->param(
118
            $template->param(
118
- 

Return to bug 20548