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.css" />
10 <body id="patlist_list" class="pat patlist">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'cat-search.inc' %]
13 <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>
15 <div id="doc3" class="yui-t2">
19 <h1>[% list.name |html %]</h1>
21 <form action="list.pl" id="add_patrons" method="post">
23 <legend>Add patrons</legend>
25 <label for="find_patron">Patron search: </label>
26 <input autocomplete="off" id="find_patron" type="text" style="width:150px" class="noEnterSubmit" />
27 <div id="find_patron_container"></div>
29 <fieldset id="patrons_to_add_fieldset">
30 <legend>Patrons to be added</legend>
31 <div id="patrons_to_add"></div>
33 <fieldset class="action">
34 <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
35 <input type="submit" value="Add patrons" />
36 <a href="lists.pl" class="cancel">Cancel</a>
43 <form action="list.pl" id="remove_patrons" method="post">
45 <div id="searchheader">
46 <span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> |
47 <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span> |
48 <div class="btn-group">
49 <button class="btn btn-default btn-xs list-remove" type="submit"><i class="fa fa-trash"></i> Remove selected</button>
53 <table id="patron-list-table">
69 [% FOREACH p IN list.patron_list_patrons %]
71 <td><input type="checkbox" name="patrons_to_remove" value="[% p.patron_list_patron_id %]" /></td>
73 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% p.borrowernumber.borrowernumber %]">
74 [% p.borrowernumber.cardnumber %]
77 <td>[% p.borrowernumber.firstname %]</td>
78 <td>[% p.borrowernumber.surname %]</td>
80 [% p.borrowernumber.address %]
81 [% p.borrowernumber.address2 %]
82 [% p.borrowernumber.city %]
83 [% p.borrowernumber.state %]
84 [% p.borrowernumber.country %]
86 <td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td>
87 <td>[% p.borrowernumber.branchcode.branchname %]</td>
88 <td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td>
89 <td>[% p.borrowernumber.borrowernotes %]</td>
95 <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" />
96 <button type="submit" class="btn btn-default btn-sm"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button>
101 <div class="yui-b noprint">
102 [% INCLUDE 'tools-menu.inc' %]
106 [% MACRO jsinclude BLOCK %]
107 <script type="text/javascript" src="[% interface %]/[% theme %]/js/tools-menu.js"></script>
108 [% INCLUDE 'datatables.inc' %]
110 <script type="text/javascript" src="[% interface %]/js/autocomplete/patrons.js"></script>
111 <script type="text/javascript">
112 var MSG_REMOVE_PATRON = _("Remove");
113 $(document).ready(function() {
114 $('#patrons_to_add_fieldset').hide();
116 $('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, {
117 "order": [[ 3, "asc" ]],
119 null,null,null,null,null,null,null,{ "sType": "title-string" },null
122 { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false },
124 "sPaginationType": "four_button"
127 patron_autocomplete({
128 patron_container: $("#patrons_to_add"),
129 input_autocomplete: $("#find_patron"),
130 patron_input_name: 'patrons_to_add'
133 var checkBoxes = $("input[type='checkbox']","#patron-list-table");
135 $("#CheckAll").click(function(e){
137 checkBoxes.each(function(){
138 $(this).prop("checked",1);
141 $("#CheckNone").click(function(e){
143 checkBoxes.each(function(){
144 $(this).prop("checked",0);
148 $("#remove_patrons").submit(function(){
149 var checkedItems = $("input:checked");
150 if ($(checkedItems).size() == 0) {
151 alert(_("You must select one or more patrons to remove"));
154 $(checkedItems).parents('tr').addClass("warn");
155 if( confirm(_("Are you sure you want to remove the selected patrons?")) ) {
158 $(checkedItems).parents('tr').removeClass("warn");
166 [% INCLUDE 'intranet-bottom.inc' %]