7 [% INCLUDE 'doc-head-open.inc' %]
8 [% SET libraries = Branches.all %]
9 [% SET categories = Categories.all.unblessed %]
10 [% PROCESS 'patron-search.inc' %]
11 <title>Patron search › Koha</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 <style> .modal-body .close { display: none; } </style>[%# FIXME This is not great, we should make members/memberentrygen.tt use a modal as well and we won't need that here %]
16 <body id="common_patron_search" class="common">
17 <div id="patron_search">
18 <div class="container-fluid">
20 [% PROCESS patron_search_filters categories => categories, libraries => libraries, filters => ['branch','category','sort1','sort2'], search_filter => searchmember %]
23 <div id="searchresults">
24 [% IF columns.grep('checkbox').size %]
25 <div class="searchheader fh-fixedHeader" id="searchheader" style="display:none;">
27 <a href="#" class="btn btn-link" id="select_all"><i class="fa fa-check"></i> Select all</a>
29 <a href="#" class="btn btn-link" id="clear_all"><i class="fa fa-remove"></i> Clear all</a>
30 [% IF selection_type == 'add' %]
31 <button id="add-selected" class="btn btn-sm btn-default" type="submit">Add selected patrons</button>
36 [% PROCESS patron_search_table table_id => 'memberresultst' columns => columns %]
39 <div id="closewindow"><a href="#" class="btn btn-default btn-default close">Close</a></div>
44 [% MACRO jsinclude BLOCK %]
45 [% INCLUDE 'select2.inc' %]
47 $(document).ready(function() {
48 $("#select_all").on("click",function(e){
50 $(".selection").prop("checked", true).change();
52 $("#clear_all").on("click",function(e){
54 $(".selection").prop("checked", false).change();
56 $("#searchheader").hide();
57 $("#patron_search_form").on('submit', function(){$("#searchheader").show();});
58 $("#clear_search").on("click",function(e){$("#searchheader").hide();});
60 $('#add-selected').on('click', function(e) {
63 $('tr:has(.selection:checked) .add_user').each(function(){
64 var borrowernumber = $(this).data('borrowernumber');
65 var firstname = $(this).data('firstname');
66 var surname = $(this).data('surname');
67 add_user( borrowernumber, firstname + ' ' + surname );
70 $('#info').html(_("%s Patrons added.").format(counter));
75 [% PROCESS patron_search_js table_id => 'memberresultst', categories => categories, libraries => libraries, extended_attribute_types => attribute_type_codes, columns => columns, filter => filter, actions => [selection_type], preview_on_name_click => 1, callback => callback %]
78 [% SET popup_window = 1 %]
79 [% INCLUDE 'intranet-bottom.inc' %]