3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Patron lists › [% list.name %] › Add patrons</title>
5 [% INCLUDE 'doc-head-close.inc' %]
7 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
8 <style type="text/css">
9 #add_patrons_by_search {
12 #patron_barcodes_line {
15 #patron_barcodes_submit {
24 <body id="patlist_list" class="pat patlist">
25 [% INCLUDE 'header.inc' %]
26 [% INCLUDE 'cat-search.inc' %]
27 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="lists.pl">Patron lists</a> › <a href="/cgi-bin/koha/patron_lists/list.pl?patron_list_id=[% list.id %]">[% list.name |html %]</a> › Add patrons</div>
29 <div id="doc3" class="yui-t2">
33 <h1>[% list.name |html %]</h1>
35 [% IF ( not_found.size > 0 ) %]
36 <div class="dialog alert"><p>Warning, the following cardnumbers were not found:</p></div>
37 <table style="margin:auto;">
39 <tr><th>Cardnumbers not found</th></tr>
42 [% FOREACH nf IN not_found %]
43 <tr><td>[% nf |html %]</td></td>
49 [% IF ( existed.size > 0 ) %]
50 <div class="dialog alert"><p>Warning, the following cardnumbers were already in this list:</p></div>
51 <table style="margin:auto;">
53 <tr><th>Cardnumbers already in list</th></tr>
56 [% FOREACH ed IN existed %]
57 <tr><td>[% ed |html %]</td></td>
63 <form action="list.pl" id="add_patrons" method="post" class="clearfix">
64 <fieldset class="rows">
65 <legend>Add patrons</legend>
67 <li id="patron_search_line">
68 <label for="find_patron">Patron search: </label>
69 <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
71 <li id="add_patrons_by_search"><a href="#">
72 <span class="label"> </span>
73 <i class="fa fa-plus"></i> Search for patrons</a></li>
74 <li id="add_patrons_by_barcode"><a href="#">
75 <span class="label"> </span>
76 <i class="fa fa-plus"></i> Enter multiple card numbers</a></li>
77 <li id="patron_barcodes_line">
78 <label for="patrons_by_barcode">Card number list (one barcode per line):</label>
79 <textarea id="patrons_by_barcode" name="patrons_by_barcode" id="" cols="30" rows="10"></textarea>
83 <fieldset id="patron_barcodes_submit" class="action">
84 <input type="submit" value="Submit" />
87 <div class="clearfix"></div>
89 <fieldset id="patrons_to_add_fieldset">
90 <legend>Patrons to be added</legend>
91 <div id="patrons_to_add"></div>
93 <fieldset class="action">
94 <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
95 <input type="submit" value="Add patrons" />
96 <a href="lists.pl" class="cancel">Cancel</a>
101 <form action="list.pl" id="remove_patrons" method="post">
103 <div id="searchheader">
104 <span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> |
105 <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span> |
106 <div class="btn-group">
107 <button class="btn btn-default btn-xs list-remove" type="submit"><i class="fa fa-trash"></i> Remove selected</button>
111 <table id="patron-list-table">
127 [% FOREACH p IN list.patron_list_patrons %]
129 <td><input type="checkbox" name="patrons_to_remove" value="[% p.patron_list_patron_id %]" /></td>
131 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber %]">
132 [% p.borrowernumber.cardnumber %]
135 <td>[% p.borrowernumber.firstname %]</td>
136 <td>[% p.borrowernumber.surname %]</td>
138 [% p.borrowernumber.address %]
139 [% p.borrowernumber.address2 %]
140 [% p.borrowernumber.city %]
141 [% p.borrowernumber.state %]
142 [% p.borrowernumber.country %]
144 <td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td>
145 <td>[% p.borrowernumber.branchcode.branchname %]</td>
146 <td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td>
147 <td>[% p.borrowernumber.borrowernotes %]</td>
153 <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
154 <button type="submit" class="btn btn-default btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button>
159 <div class="yui-b noprint">
160 [% INCLUDE 'tools-menu.inc' %]
164 [% MACRO jsinclude BLOCK %]
165 <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu_[% KOHA_VERSION %].js"></script>
166 [% INCLUDE 'datatables.inc' %]
168 <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons_[% KOHA_VERSION %].js"></script>
169 <script type="text/javascript">
170 var MSG_REMOVE_PATRON = _("Remove");
171 $(document).ready(function() {
172 $('#patrons_to_add_fieldset').hide();
174 $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
175 "order": [[ 3, "asc" ]],
177 null,null,null,null,null,null,null,{ "sType": "title-string" },null
180 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
182 "sPaginationType": "four_button"
185 patron_autocomplete({
186 patron_container: $("#patrons_to_add"),
187 input_autocomplete: $("#find_patron"),
188 patron_input_name: 'patrons_to_add'
191 var checkBoxes = $("input[type='checkbox']","#patron-list-table");
193 $("#CheckAll").click(function(e){
195 checkBoxes.each(function(){
196 $(this).prop("checked",1);
199 $("#CheckNone").click(function(e){
201 checkBoxes.each(function(){
202 $(this).prop("checked",0);
206 $("#remove_patrons").submit(function(){
207 var checkedItems = $("input:checked");
208 if ($(checkedItems).size() == 0) {
209 alert(_("You must select one or more patrons to remove"));
212 $(checkedItems).parents('tr').addClass("warn");
213 if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
216 $(checkedItems).parents('tr').removeClass("warn");
221 $("#add_patrons_by_barcode a").on("click", function(){
222 $("#add_patrons_by_barcode, #patron_search_line").hide();
223 $("#add_patrons_by_search, #patron_barcodes_line, #patron_barcodes_submit").show();
226 $("#add_patrons_by_search a").on("click", function(){
227 $("#add_patrons_by_barcode, #patron_search_line").show();
228 $("#add_patrons_by_search, #patron_barcodes_line, #patron_barcodes_submit").hide();
234 [% INCLUDE 'intranet-bottom.inc' %]