Bugzilla – Attachment 73870 Details for
Bug 20284
ILL: Adding a 'new request' from OPAC fails with template error if text exists in ILLModuleCopyrightClearance
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug [20284] - [ILL: Adding a 'new request' from ..]
Bug-20284---ILL-Adding-a-new-request-from-.patch (text/plain), 6.24 KB, created by
Andrew Isherwood
on 2018-04-09 14:01:15 UTC
(
hide
)
Description:
Bug [20284] - [ILL: Adding a 'new request' from ..]
Filename:
MIME Type:
Creator:
Andrew Isherwood
Created:
2018-04-09 14:01:15 UTC
Size:
6.24 KB
patch
obsolete
>From c114d133fa26aacd1ab4a4d1c2b6c14772be2aa1 Mon Sep 17 00:00:00 2001 >From: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> >Date: Mon, 9 Apr 2018 14:32:21 +0100 >Subject: [PATCH] Bug [20284] - [ILL: Adding a 'new request' from ..] > >This patch fixes the display of the copyright notice text that is defined in ILLModuleCopyrightClearance preference when placing ILL requests from the OPAC. Handling of the copyrightclearance stage was missing, this has been added. > >Test plan: > >- 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 >- 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 (prior to this patch, this screen displayed an error) >- TEST: Check that clicking "Yes" takes you to the form for adding request details >- TEST: Check that clicking "No" takes you back to the "Interlibrary loan requests" page >--- > .../bootstrap/en/modules/opac-illrequests.tt | 47 ++++++++++++++-------- > opac/opac-illrequests.pl | 24 +++++++---- > 2 files changed, 46 insertions(+), 25 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >index ae9b918290..08e21d6f2d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt >@@ -54,24 +54,37 @@ > <div id="illrequests" class="maincontent"> > [% IF method == 'create' %] > <h2>New Interlibrary loan request</h2> >- [% INCLUDE messages %] >- [% IF backends %] >- <form method="post" id="illrequestcreate-form" novalidate="novalidate"> >- <fieldset class="rows"> >- <label for="backend">Provider:</label> >- <select name="backend"> >- [% FOREACH backend IN backends %] >- <option value="[% backend %]">[% backend %]</option> >- [% END %] >- </select> >- </fieldset> >- <fieldset class="action"> >- <input type="hidden" name="method" value="create"> >- <input type="submit" name="create_select_backend" value="Next"> >- </fieldset> >- </form> >+ [% IF stage == 'copyrightclearance' %] >+ [% INCLUDE messages %] >+ <div> >+ <p> >+ [% Koha.Preference('ILLModuleCopyrightClearance') %] >+ </p> >+ <a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend %]" >+ class="btn btn-sm btn-default"><i class="fa fa-check"></i> Yes</a> >+ <a href="/cgi-bin/koha/opac-illrequests.pl" >+ class="btn btn-sm btn-default"><i class="fa fa-times"></i> No</a> >+ </div> > [% ELSE %] >- [% PROCESS $whole.opac_template %] >+ [% INCLUDE messages %] >+ [% IF backends %] >+ <form method="post" id="illrequestcreate-form" novalidate="novalidate"> >+ <fieldset class="rows"> >+ <label for="backend">Provider:</label> >+ <select name="backend"> >+ [% FOREACH backend IN backends %] >+ <option value="[% backend %]">[% backend %]</option> >+ [% END %] >+ </select> >+ </fieldset> >+ <fieldset class="action"> >+ <input type="hidden" name="method" value="create"> >+ <input type="submit" name="create_select_backend" value="Next"> >+ </fieldset> >+ </form> >+ [% ELSE %] >+ [% PROCESS $whole.opac_template %] >+ [% END %] > [% END %] > [% ELSIF method == 'list' %] > <h2>Interlibrary loan requests</h2> >diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl >index 4590284184..110898d2ba 100755 >--- a/opac/opac-illrequests.pl >+++ b/opac/opac-illrequests.pl >@@ -112,15 +112,23 @@ if ( $op eq 'list' ) { > borrowernumber => $loggedinuser > })->cardnumber; > my $backend_result = $request->backend_create($params); >- $template->param( >- media => [ "Book", "Article", "Journal" ], >- branches => Koha::Libraries->search->unblessed, >- whole => $backend_result, >- request => $request >- ); >- if ($backend_result->{stage} eq 'commit') { >- print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); >+ if ($backend_result->{stage} eq 'copyrightclearance') { >+ $template->param( >+ stage => $backend_result->{stage}, >+ whole => $backend_result >+ ); >+ } else { >+ $template->param( >+ media => [ "Book", "Article", "Journal" ], >+ branches => Koha::Libraries->search->unblessed, >+ whole => $backend_result, >+ request => $request >+ ); >+ if ($backend_result->{stage} eq 'commit') { >+ print $query->redirect('/cgi-bin/koha/opac-illrequests.pl?message=2'); >+ } > } >+ > } > } > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20284
:
73870
|
74156
|
74426
|
74599
|
74652
|
75079
|
75080
|
75081
|
75082