Lines 1-6
Link Here
|
1 |
[% USE KohaDates %] |
1 |
[% USE KohaDates %] |
2 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
[% INCLUDE 'doc-head-open.inc' %] |
3 |
<title>Koha › Tools › Patron lists › New list</title> |
3 |
<title>Koha › Tools › Patron lists › [% list.name %] › Add patrons</title> |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
5 |
|
5 |
|
6 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
6 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
Lines 11-17
Link Here
|
11 |
$(document).ready(function() { |
11 |
$(document).ready(function() { |
12 |
$('#patrons_to_add_fieldset').hide(); |
12 |
$('#patrons_to_add_fieldset').hide(); |
13 |
|
13 |
|
14 |
$('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults)); |
14 |
$('#patron-list-table').dataTable($.extend(true, {}, dataTablesDefaults, { |
|
|
15 |
"aoColumns": [ |
16 |
null,null,null,null,null,null,null,{ "sType": "title-string" },null |
17 |
], |
18 |
"aoColumnDefs": [ |
19 |
{ "aTargets": [ 0 ], "bSortable": false, "bSearchable": false }, |
20 |
] |
21 |
} )); |
15 |
|
22 |
|
16 |
$( "#find_patron" ).autocomplete({ |
23 |
$( "#find_patron" ).autocomplete({ |
17 |
source: "/cgi-bin/koha/circ/ysearch.pl", |
24 |
source: "/cgi-bin/koha/circ/ysearch.pl", |
Lines 27-32
$(document).ready(function() {
Link Here
|
27 |
.append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
34 |
.append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) |
28 |
.appendTo( ul ); |
35 |
.appendTo( ul ); |
29 |
}; |
36 |
}; |
|
|
37 |
|
38 |
var checkBoxes = $("input[type='checkbox']","#patron-list-table"); |
39 |
|
40 |
$("#CheckAll").click(function(e){ |
41 |
e.preventDefault(); |
42 |
checkBoxes.each(function(){ |
43 |
$(this).prop("checked",1); |
44 |
}); |
45 |
}); |
46 |
$("#CheckNone").click(function(e){ |
47 |
e.preventDefault(); |
48 |
checkBoxes.each(function(){ |
49 |
$(this).prop("checked",0); |
50 |
}); |
51 |
}); |
52 |
|
53 |
$("#remove_patrons").submit(function(){ |
54 |
var checkedItems = $("input:checked"); |
55 |
if ($(checkedItems).size() == 0) { |
56 |
alert(_("You must select one or more patrons to remove")); |
57 |
return false; |
58 |
} |
59 |
$(checkedItems).parents('tr').addClass("warn"); |
60 |
if( confirm(_("Are you sure you want to remove the selected patrons?")) ) { |
61 |
return true; |
62 |
} else { |
63 |
$(checkedItems).parents('tr').removeClass("warn"); |
64 |
return false; |
65 |
} |
66 |
}); |
67 |
|
30 |
}); |
68 |
}); |
31 |
|
69 |
|
32 |
function AddPatron( name, cardnumber ) { |
70 |
function AddPatron( name, cardnumber ) { |
Lines 53-65
function RemovePatron( cardnumber ) {
Link Here
|
53 |
<body> |
91 |
<body> |
54 |
[% INCLUDE 'header.inc' %] |
92 |
[% INCLUDE 'header.inc' %] |
55 |
[% INCLUDE 'cat-search.inc' %] |
93 |
[% INCLUDE 'cat-search.inc' %] |
56 |
<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> › Add patrons</div> |
94 |
<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 %]</a> › Add patrons</div> |
57 |
|
95 |
|
58 |
<div class="yui-t7"> |
96 |
<div class="yui-t7"> |
59 |
<div class="yui-main"> |
97 |
<div class="yui-main"> |
60 |
<h1>[% list.name %]</h1> |
98 |
<h1>[% list.name %]</h1> |
61 |
|
99 |
|
62 |
<form action="list.pl" method="post"> |
100 |
<form action="list.pl" id="add_patrons" method="post"> |
63 |
<fieldset> |
101 |
<fieldset> |
64 |
<legend>Add patrons</legend> |
102 |
<legend>Add patrons</legend> |
65 |
|
103 |
|
Lines 70-88
function RemovePatron( cardnumber ) {
Link Here
|
70 |
<fieldset id="patrons_to_add_fieldset"> |
108 |
<fieldset id="patrons_to_add_fieldset"> |
71 |
<legend>Patrons to be added</legend> |
109 |
<legend>Patrons to be added</legend> |
72 |
<div id="patrons_to_add"></div> |
110 |
<div id="patrons_to_add"></div> |
|
|
111 |
|
112 |
<fieldset class="action"> |
113 |
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> |
114 |
<input type="submit" value="Add patrons" /> |
115 |
<a href="lists.pl" class="cancel">Cancel</a> |
116 |
</fieldset> |
73 |
</fieldset> |
117 |
</fieldset> |
74 |
|
118 |
|
75 |
</fieldset> |
119 |
</fieldset> |
|
|
120 |
</form> |
121 |
|
122 |
<form action="list.pl" id="remove_patrons" method="post"> |
76 |
|
123 |
|
77 |
<p> |
124 |
<div id="searchheader"> |
78 |
<input type="submit" class="btn" value="Update" /> |
125 |
<span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | |
79 |
<a href="lists.pl" class="cancel">Cancel</a> |
126 |
<span class="clearall"><a id="CheckNone" href="#">Clear all</a></span> | |
80 |
</p> |
127 |
<div class="btn-group"> |
|
|
128 |
<button class="btn btn-mini list-remove" type="submit"><i class="icon-remove-sign"></i> Remove selected</button> |
129 |
</div> |
130 |
</div> |
81 |
|
131 |
|
82 |
<table id="patron-list-table"> |
132 |
<table id="patron-list-table"> |
83 |
<thead> |
133 |
<thead> |
84 |
<tr> |
134 |
<tr> |
85 |
<th><i title="Remove patron from list" class="icon-trash"></i></th> |
135 |
<th> </th> |
86 |
<th>Card</th> |
136 |
<th>Card</th> |
87 |
<th>Firstname</th> |
137 |
<th>Firstname</th> |
88 |
<th>Surname</th> |
138 |
<th>Surname</th> |
Lines 114-120
function RemovePatron( cardnumber ) {
Link Here
|
114 |
</td> |
164 |
</td> |
115 |
<td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td> |
165 |
<td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td> |
116 |
<td>[% p.borrowernumber.branchcode.branchname %]</td> |
166 |
<td>[% p.borrowernumber.branchcode.branchname %]</td> |
117 |
<td>[% p.borrowernumber.dateexpiry | $KohaDates %]</td> |
167 |
<td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td> |
118 |
<td>[% p.borrowernumber.borrowernotes %]</td> |
168 |
<td>[% p.borrowernumber.borrowernotes %]</td> |
119 |
</tr> |
169 |
</tr> |
120 |
[% END %] |
170 |
[% END %] |
Lines 122-129
function RemovePatron( cardnumber ) {
Link Here
|
122 |
</table> |
172 |
</table> |
123 |
|
173 |
|
124 |
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> |
174 |
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> |
125 |
<input type="submit" class="btn" value="Update" /> |
175 |
<input type="submit" value="Remove selected patrons" /> |
126 |
<a href="lists.pl" class="cancel">Cancel</a> |
|
|
127 |
</form> |
176 |
</form> |
128 |
</div> |
177 |
</div> |
129 |
</div> |
178 |
</div> |
130 |
- |
|
|