|
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 34-39
$(document).ready(function() {
Link Here
|
| 34 |
var cardnumber = divid.replace("borrower_",""); |
41 |
var cardnumber = divid.replace("borrower_",""); |
| 35 |
RemovePatron(cardnumber); |
42 |
RemovePatron(cardnumber); |
| 36 |
}); |
43 |
}); |
|
|
44 |
|
| 45 |
var checkBoxes = $("input[type='checkbox']","#patron-list-table"); |
| 46 |
|
| 47 |
$("#CheckAll").click(function(e){ |
| 48 |
e.preventDefault(); |
| 49 |
checkBoxes.each(function(){ |
| 50 |
$(this).prop("checked",1); |
| 51 |
}); |
| 52 |
}); |
| 53 |
$("#CheckNone").click(function(e){ |
| 54 |
e.preventDefault(); |
| 55 |
checkBoxes.each(function(){ |
| 56 |
$(this).prop("checked",0); |
| 57 |
}); |
| 58 |
}); |
| 59 |
|
| 60 |
$("#remove_patrons").submit(function(){ |
| 61 |
var checkedItems = $("input:checked"); |
| 62 |
if ($(checkedItems).size() == 0) { |
| 63 |
alert(_("You must select one or more patrons to remove")); |
| 64 |
return false; |
| 65 |
} |
| 66 |
$(checkedItems).parents('tr').addClass("warn"); |
| 67 |
if( confirm(_("Are you sure you want to remove the selected patrons?")) ) { |
| 68 |
return true; |
| 69 |
} else { |
| 70 |
$(checkedItems).parents('tr').removeClass("warn"); |
| 71 |
return false; |
| 72 |
} |
| 73 |
}); |
| 37 |
}); |
74 |
}); |
| 38 |
|
75 |
|
| 39 |
function AddPatron( name, cardnumber ) { |
76 |
function AddPatron( name, cardnumber ) { |
|
Lines 60-72
function RemovePatron( cardnumber ) {
Link Here
|
| 60 |
<body> |
97 |
<body> |
| 61 |
[% INCLUDE 'header.inc' %] |
98 |
[% INCLUDE 'header.inc' %] |
| 62 |
[% INCLUDE 'cat-search.inc' %] |
99 |
[% INCLUDE 'cat-search.inc' %] |
| 63 |
<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> |
100 |
<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> |
| 64 |
|
101 |
|
| 65 |
<div class="yui-t7"> |
102 |
<div class="yui-t7"> |
| 66 |
<div class="yui-main"> |
103 |
<div class="yui-main"> |
| 67 |
<h1>[% list.name %]</h1> |
104 |
<h1>[% list.name %]</h1> |
| 68 |
|
105 |
|
| 69 |
<form action="list.pl" method="post"> |
106 |
<form action="list.pl" id="add_patrons" method="post"> |
| 70 |
<fieldset> |
107 |
<fieldset> |
| 71 |
<legend>Add patrons</legend> |
108 |
<legend>Add patrons</legend> |
| 72 |
|
109 |
|
|
Lines 77-95
function RemovePatron( cardnumber ) {
Link Here
|
| 77 |
<fieldset id="patrons_to_add_fieldset"> |
114 |
<fieldset id="patrons_to_add_fieldset"> |
| 78 |
<legend>Patrons to be added</legend> |
115 |
<legend>Patrons to be added</legend> |
| 79 |
<div id="patrons_to_add"></div> |
116 |
<div id="patrons_to_add"></div> |
|
|
117 |
|
| 118 |
<fieldset class="action"> |
| 119 |
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> |
| 120 |
<input type="submit" value="Add patrons" /> |
| 121 |
<a href="lists.pl" class="cancel">Cancel</a> |
| 122 |
</fieldset> |
| 80 |
</fieldset> |
123 |
</fieldset> |
| 81 |
|
124 |
|
| 82 |
</fieldset> |
125 |
</fieldset> |
|
|
126 |
</form> |
| 127 |
|
| 128 |
<form action="list.pl" id="remove_patrons" method="post"> |
| 83 |
|
129 |
|
| 84 |
<p> |
130 |
<div id="searchheader"> |
| 85 |
<input type="submit" class="btn" value="Update" /> |
131 |
<span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | |
| 86 |
<a href="lists.pl" class="cancel">Cancel</a> |
132 |
<span class="clearall"><a id="CheckNone" href="#">Clear all</a></span> | |
| 87 |
</p> |
133 |
<div class="btn-group"> |
|
|
134 |
<button class="btn btn-mini list-remove" type="submit"><i class="icon-remove-sign"></i> Remove selected</button> |
| 135 |
</div> |
| 136 |
</div> |
| 88 |
|
137 |
|
| 89 |
<table id="patron-list-table"> |
138 |
<table id="patron-list-table"> |
| 90 |
<thead> |
139 |
<thead> |
| 91 |
<tr> |
140 |
<tr> |
| 92 |
<th><i title="Remove patron from list" class="icon-trash"></i></th> |
141 |
<th> </th> |
| 93 |
<th>Card</th> |
142 |
<th>Card</th> |
| 94 |
<th>Firstname</th> |
143 |
<th>Firstname</th> |
| 95 |
<th>Surname</th> |
144 |
<th>Surname</th> |
|
Lines 121-127
function RemovePatron( cardnumber ) {
Link Here
|
| 121 |
</td> |
170 |
</td> |
| 122 |
<td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td> |
171 |
<td>[% p.borrowernumber.categorycode.description %] ([% p.borrowernumber.categorycode.categorycode %])</td> |
| 123 |
<td>[% p.borrowernumber.branchcode.branchname %]</td> |
172 |
<td>[% p.borrowernumber.branchcode.branchname %]</td> |
| 124 |
<td>[% p.borrowernumber.dateexpiry | $KohaDates %]</td> |
173 |
<td><span title="[% p.borrowernumber.dateexpiry %]">[% p.borrowernumber.dateexpiry | $KohaDates %]</span></td> |
| 125 |
<td>[% p.borrowernumber.borrowernotes %]</td> |
174 |
<td>[% p.borrowernumber.borrowernotes %]</td> |
| 126 |
</tr> |
175 |
</tr> |
| 127 |
[% END %] |
176 |
[% END %] |
|
Lines 129-136
function RemovePatron( cardnumber ) {
Link Here
|
| 129 |
</table> |
178 |
</table> |
| 130 |
|
179 |
|
| 131 |
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> |
180 |
<input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> |
| 132 |
<input type="submit" class="btn" value="Update" /> |
181 |
<input type="submit" value="Remove selected patrons" /> |
| 133 |
<a href="lists.pl" class="cancel">Cancel</a> |
|
|
| 134 |
</form> |
182 |
</form> |
| 135 |
</div> |
183 |
</div> |
| 136 |
</div> |
184 |
</div> |
| 137 |
- |
|
|