Bug 22464: Pass forward parameters

This patch ensures that parameters that are present are passed forward
when accepting the copyright notice.

Test plan:

- Clone the latest version of the FreeForm backend from:
  https://github.com/PTFS-Europe/koha-ill-freeform
- Ensure the ILLModuleCopyrightClearance syspref is populated
- Create an OpenURL in order to pre-populate the FreeForm form, a suitable URL would be:

<your_koha_instance>/cgi-bin/koha/opac-illrequests.pl?openurl=true&backend=FreeForm&method=create&opac=1&atitle=Theater%20careers.%20%5Belectronic%20resource%5D%20%3A%20a%20realistic%20guide.&aulast=Donahue%2C%20Tim&date=2012&genre=article&isbn=978123123123&issn=1234-5678&issue=34&pages=12-34&sid=EBSCO%3AAthlone%20Institute%20of%20Technology%3Aait.101326&title=article%20title%20here&volume=12

- Log in
- Accept the copyright notice
=> TEST: Observe that the FreeForm form is pre-filled with the metadata
supplied in the OpenURL

Signed-off-by: Liz Rea <wizzyrea@gmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 5e20e438e8)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Andrew Isherwood 2019-03-06 14:07:50 +00:00 committed by Martin Renvoize
parent b61c41f0ef
commit bb22c319d3
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 3 additions and 1 deletions

View File

@ -622,6 +622,7 @@ sub backend_create {
method => 'create',
stage => 'copyrightclearance',
value => {
other => $params,
backend => $self->_backend->name
}
};

View File

@ -62,7 +62,8 @@
<p>
[% Koha.Preference('ILLModuleCopyrightClearance') | $raw %]
</p>
<a href="?method=create&stage=copyrightclearance&backend=[% whole.value.backend | uri %]"
[% USE link_url = url('/cgi-bin/koha/opac-illrequests.pl', whole.value.other) %]
<a href="[% link_url _ '&amp;stage=copyrightclearance' | $raw %]"
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>