c656cff676
To test: Apply the patch and see that the text now is there in the search box when clicking the tabs: check in, check out etc.. (More files changed for persistent text in searchbox) Sponsored-by: Halland County Library Signed-off-by: Magnus Enger <magnus@enger.priv.no> This is something I have wanted quite a few times over the years... Tested by going to every main area of Koha, entering some random text into the search box and then clicking on all the available tabs to check that the entered text is carried over to all the boxes. There are a couple of places where text is not carried over, but I guess that might be because one of the boxes is structurally different to the others. These are: - "Vendor search" and "Orders search" in Acquisitions - "Search subscriptions" in Serials I have not looked at how this is implemented, just that it works as it should. Bug 14189 refactor after failed QA. Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org> Amended patch: replace tabs with spaces Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
50 lines
2.3 KiB
HTML
50 lines
2.3 KiB
HTML
[% USE Branches %]
|
|
[% IF ( CAN_user_circulate ) %][% IF ( CircAutocompl ) %]<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$( "#findborrower" ).autocomplete({
|
|
source: "/cgi-bin/koha/circ/ysearch.pl",
|
|
minLength: 3,
|
|
select: function( event, ui ) {
|
|
$( "#findborrower" ).val( ui.item.cardnumber );
|
|
$("#patronsearch").submit();
|
|
return false;
|
|
}
|
|
})
|
|
.data( "ui-autocomplete" )._renderItem = function( ul, item ) {
|
|
return $( "<li></li>" )
|
|
.data( "ui-autocomplete-item", item )
|
|
.append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" )
|
|
.appendTo( ul );
|
|
};
|
|
|
|
});
|
|
//]]>
|
|
</script>[% END %]
|
|
<div id="circ_search" class="residentsearch">
|
|
<p class="tip">Enter patron card number or partial name:</p>
|
|
<form action="/cgi-bin/koha/circ/circulation.pl" id="patronsearch" method="post">
|
|
[% IF ( CircAutocompl ) %]
|
|
<div class="autocomplete">
|
|
<input autocomplete="off" id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
|
|
<input id="autocsubmit" type="submit" class="submit" value="Submit" />
|
|
<input name="branch" value="[% Branches.GetLoggedInBranchcode() %]" type="hidden" />
|
|
<input name="printer" value="" type="hidden" />
|
|
[% IF ( stickyduedate ) %]
|
|
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
|
|
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
|
|
[% END %]
|
|
</div>
|
|
[% ELSE %]
|
|
<input id="findborrower" name="findborrower" size="40" class="head-searchbox focus" type="text" />
|
|
<input name="branch" value="[% branch %]" type="hidden" />
|
|
<input name="printer" value="" type="hidden" />
|
|
[% IF ( stickyduedate ) %]
|
|
<input type="hidden" name="duedatespec" value="[% duedatespec %]" />
|
|
<input type="hidden" name="stickyduedate" value="[% stickyduedate %]" />
|
|
[% END %]
|
|
<input value="Submit" class="submit" type="submit" />
|
|
[% END %]
|
|
</form>
|
|
</div>
|
|
[% END %]
|