Bug 28112: Z39.50 does not populate form with all passed criteria

This patch adds output of some already-existing template variables in
the Z39.50 search form so that all parameters can be used to prepopulate
the form.

To test, apply the patch and go to Cataloging.

- Click the "New from Z39.50/SRU" button
  - A window should pop up and the form should be empty.
  - Confirm that searching works correctly.
- Perform the same test from a bibliographic detail page using the Edit
  menu -> Replace record via Z39.50/SRU.
  - Some fields in the search form should be prepopulated, e.g. ISBN,
    title, author.
- Paste this link into your browser:
  http://path.to.your.koha/cgi-bin/koha/cataloguing/z3950_search.pl?frameworkcode=&isbn=isbn&issn=issn&title=title&author=author&dewey=dewey&subject=subject&lccall=lccall&controlnumber=controlnumber&stdid=stdid&srchany=srchany&publicationyear=publicationyear
  - The search form should appear with all fields prepopulated.

- Perform the same tests in Acquisitions with the option for adding to a
  basket via an external search.
  - The link for testing all parameters:
    http://path.to.your.koha/cgi-bin/koha/acqui/z3950_search.pl?booksellerid=4&basketno=3&isbn=isbn&issn=issn&title=title&author=author&dewey=dewey&subject=subject&lccall=lccall&controlnumber=controlnumber&stdid=stdid&srchany=srchany&publicationyear=publicationyear

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Owen Leonard 2021-04-07 16:27:31 +00:00 committed by Jonathan Druart
parent 66aa12e874
commit 0f33c0a7d5
2 changed files with 39 additions and 16 deletions

View file

@ -63,12 +63,25 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
<li><label for="searchtitle">Title: </label> <input type="text" id="searchtitle" name="title" value="[% title | html %]" class="focus" /></li>
<li><label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li>
<li><label for="publicationyear">Publication year: </label> <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" /></li>
<li><label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
<li><label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
<li><label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
<li><label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
<li><label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
<li><label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
<li>
<label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="[% subject | html %]" />
</li>
<li>
<label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="[% srchany | html %]" />
</li>
<li>
<label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="[% lccall | html %]" />
</li>
<li>
<label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="[% controlnumber | html %]" />
</li>
<li>
<label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="[% dewey | html %]" />
</li>
<li>
<label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="[% stdid | html %]" />
</li>
<li>
<li><label for="frameworkcode" >Select MARC framework:</label>
<select id="frameworkcode" name="frameworkcode" >
<option value="">Default</option>

View file

@ -25,25 +25,35 @@
<label for="isbn">ISBN: </label> <input type="text" id="isbn" name="isbn" value="[% isbn | html %]" class="focus" />
</li>
<li>
<label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn | html %]" /></li>
<label for="issn">ISSN: </label> <input type="text" id="issn" name="issn" value="[% issn | html %]" />
</li>
<li>
<label for="title">Title: </label> <input type="text" id="title" name="title" value="[% title | html %]" /></li>
<label for="title">Title: </label> <input type="text" id="title" name="title" value="[% title | html %]" />
</li>
<li>
<label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" /></li>
<label for="author">Author: </label> <input type="text" id="author" name="author" value="[% author | html %]" />
</li>
<li>
<label for="publicationyear">Publication year: </label> <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" /></li>
<label for="publicationyear">Publication year: </label> <input type="text" id="publicationyear" name="publicationyear" value="[% publicationyear | html %]" />
</li>
<li>
<label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="" /></li>
<label for="subject">Subject heading: </label> <input type="text" id="subject" name="subject" value="[% subject | html %]" />
</li>
<li>
<label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="" /></li>
<label for="srchany">Keyword (any): </label> <input type="text" id="srchany" name="srchany" value="[% srchany | html %]" />
</li>
<li>
<label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="" /></li>
<label for="lccall">LC call number: </label> <input type="text" id="lccall" name="lccall" value="[% lccall | html %]" />
</li>
<li>
<label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="" /></li>
<label for="controlnumber">Control no.: </label> <input type="text" id="controlnumber" name="controlnumber" value="[% controlnumber | html %]" />
</li>
<li>
<label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="" /></li>
<label for="dewey">Dewey: </label> <input type="text" id="dewey" name="dewey" value="[% dewey | html %]" />
</li>
<li>
<label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="" /></li>
<label for="stdid">Standard ID: </label> <input type="text" id="stdid" name="stdid" value="[% stdid | html %]" />
</li>
<li>
<a id="resetZ3950Search" href="#"><i class="fa fa-trash"></i> Clear search form</a>
</li>