## parse the query_cgi string and put it into a form suitable for <input>s
my @query_inputs;
my $scan_index_to_use;
+my $scan_search_term_to_use;
for my $this_cgi ( split('&',$query_cgi) ) {
next unless $this_cgi;
if ($input_name eq 'idx') {
$scan_index_to_use = $input_value; # unless $scan_index_to_use;
}
+ if ($input_name eq 'q') {
+ $scan_search_term_to_use = $input_value;
+ }
}
$template->param ( QUERY_INPUTS => \@query_inputs,
- scan_index_to_use => $scan_index_to_use );
+ scan_index_to_use => $scan_index_to_use,
+ scan_search_term_to_use => $scan_search_term_to_use );
## parse the limit_cgi string and put it into a form suitable for <input>s
my @limit_inputs;
<table>
<tr>
<td>
- Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
+ [% IF ( scan_search_term_to_use ) %]
+ Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="[% scan_search_term_to_use %]" />
+ [% ELSE %]
+ Scan Index for: <input type="text" name="q" id="scan-index" size="35" value="" />
+ [% END %]
</td>
</tr>
<tr>
[% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
<tr>
<td>
- <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% SEARCH_RESULT.scan_index_to_use %]&q=[% SEARCH_RESULT.scan_use |url %]"[% SEARCH_RESULT.title %]"">[% SEARCH_RESULT.title |html %]</a>
+ <a href="/cgi-bin/koha/catalogue/search.pl?idx=[% scan_index_to_use %]&q=[% SEARCH_RESULT.scan_use |url %]"[% SEARCH_RESULT.title %]"">[% SEARCH_RESULT.title |html %]</a>
</td>
<td>
[% SEARCH_RESULT.author %]