}
});
- $("#patron_list_dialog").hide();
$("#add_to_patron_list_submit").on('click', function(e){
if ( $('#add_to_patron_list').val() == 'new' ) {
if ( $('#new_patron_list').val() ) {
e.preventDefault();
clearFilters(true);
});
+ $("#searchform").on("submit", filter);
});
var dtMemberResults;
var search = 1;
$(document).ready(function() {
[% IF searchmember %]
- $("#searchmember_filter").val("[% searchmember %]");
+ $("#searchmember_filter").val("[% searchmember | html %]");
[% END %]
[% IF searchfieldstype %]
$("searchfieldstype_filter").val("[% searchfieldstype %]");
[% END %]
[% IF view != "show_results" %]
- $("#searchresults").hide();
search = 0;
+ [% ELSE %]
+ $("#searchresults").show();
[% END %]
// Build the aLengthMenu
// Apply DataTables on the results table
var columns_settings = [% ColumnsSettings.GetColumns( 'members', 'member', 'memberresultst', 'json' ) %];
+ [% UNLESS CAN_user_tools_manage_patron_lists %]
+ [%# Remove the first column if we do not display the checkbox %]
+ columns_settings.splice(0, 1);
+ [% END %]
dtMemberResults = KohaTable("#memberresultst", {
'bServerSide': true,
'sAjaxSource': "/cgi-bin/koha/svc/members/search",
[% IF ( CAN_user_borrowers && pending_borrower_modifications ) %]
<div class="pending-info" id="patron_updates_pending">
<a href="/cgi-bin/koha/members/members-update.pl">Patrons requesting modifications</a>:
- <span class="holdcount"><a href="/cgi-bin/koha/members/members-update.pl">[% pending_borrower_modifications %]</a></span>
+ <span class="number_box"><a href="/cgi-bin/koha/members/members-update.pl">[% pending_borrower_modifications %]</a></span>
</div>
[% END %]
<div id="searchresults">
<div id="searchheader">
- <h3>Patrons found for: <span id="searchpattern">[% IF searchmember %] for '[% searchmember %]'[% END %]</span></h3>
+ <h3>Patrons found for: <span id="searchpattern">[% IF searchmember %] for '[% searchmember | html %]'[% END %]</span></h3>
</div>
[% IF CAN_user_tools_manage_patron_lists %]
<div id="searchheader">
</div>
</div>
<div class="yui-b">
- <form onsubmit="return filter();" id="searchform">
+ <form method="get" id="searchform">
<input type="hidden" id="firstletter_filter" value="" />
<fieldset class="brief">
<h3>Filters</h3>
[% IF branches.size != 1 %]
<option value="">Any</option>
[% END %]
- [% FOREACH b IN branches %]
- [% IF b.selected %]
- <option selected="selected" value="[% b.branchcode %]">[% b.branchname %]</option>
- [% ELSE %]
- <option value="[% b.branchcode %]">[% b.branchname %]</option>
- [% END %]
- [% END %]
+ [% PROCESS options_for_libraries libraries => branches %]
</select>
</li>
</ol>