<h3 id="modalLoginLabel">Log in to your account</h3>
</div>
<form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="modalAuth">
+ <input type="hidden" name="has-search-query" id="has-search-query" value="" />
<div class="modal-body">
[% IF ( shibbolethAuthentication ) %]
[% IF ( invalidShibLogin ) %]
[% IF ( OpacStarRatings == 'all' || Koha.Preference('Babeltheque') ) %][% Asset.js("lib/jquery/plugins/jquery.rating.js") %][% END %]
[% IF ( OverDriveEnabled ) %][% Asset.js("js/overdrive.js") %][% END %]
[% Asset.js("lib/jquery/plugins/jquery.checkboxes.min.js") %]
+[% Asset.js("js/authtoresults.js") %]
[% IF ( OpacHighlightedWords ) %][% Asset.js("lib/jquery/plugins/jquery.highlight-3.js") %]
[% END %]<script>
//<![CDATA[
--- /dev/null
+if (window.location.href.indexOf("opac-search.pl") > -1) {
+
+ // extract search params
+ var searchUrl = location.href;
+ var searchParams = searchUrl.substring(searchUrl.indexOf("?")+1);
+
+ // store search params in loginModal to pass back on redirect
+ var query = document.getElementById("has-search-query");
+ query.value = searchParams;
+}
\ No newline at end of file
failed_holds => scalar $query->param('failed_holds'),
);
+# if not an empty string this indicates to return
+# back to the opac-results page
+my $search_query = $query->param('has-search-query');
+
+if ($search_query ne '') {
+
+ print $query->redirect(
+ -uri => "/cgi-bin/koha/opac-search.pl?$search_query",
+ -cookie => $cookie,
+ );
+}
+
output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };