|
Lines 1-15
Link Here
|
| 1 |
[% USE KohaDates %] |
1 |
[% USE KohaDates %] |
| 2 |
[% INCLUDE 'doc-head-open.inc'%] |
2 |
[% INCLUDE 'doc-head-open.inc'%] |
| 3 |
<title>Koha › Tools › [% IF ( del ) %]Batch item deletion[% ELSE %]Batch item modification[% END %] </title> |
3 |
<title>Koha › Tools › Batch patron modification</title> |
| 4 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'doc-head-close.inc' %] |
| 5 |
[% INCLUDE 'calendar.inc' %] |
5 |
[% INCLUDE 'calendar.inc' %] |
| 6 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> |
6 |
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> |
| 7 |
<script type="text/JavaScript" language="JavaScript"> |
7 |
<script type="text/JavaScript"> |
| 8 |
//<![CDATA[ |
8 |
//<![CDATA[ |
| 9 |
var patron_attributes_lib = new Array(); |
9 |
var patron_attributes_lib = new Array(); |
| 10 |
var patron_attributes_values = new Array(); |
10 |
var patron_attributes_values = new Array(); |
| 11 |
$(document).ready(function() { |
11 |
$(document).ready(function() { |
| 12 |
$("#borrowerst").tablesorter(); |
12 |
$("#borrowerst").tablesorter({ |
|
|
13 |
[% IF ( op == 'show' ) %]headers: { 0: { sorter: false}},[% END %] |
| 14 |
widgets : ['zebra'], |
| 15 |
sortList: [[1,0]] |
| 16 |
}); |
| 13 |
|
17 |
|
| 14 |
$("#selectallbutton").click(function() { |
18 |
$("#selectallbutton").click(function() { |
| 15 |
$("#borrowerst").find("input:checkbox").each(function() { |
19 |
$("#borrowerst").find("input:checkbox").each(function() { |
|
Lines 53-59
Link Here
|
| 53 |
var information_category_node = $(select_attr).parent().parent().find('span.information_category'); |
57 |
var information_category_node = $(select_attr).parent().parent().find('span.information_category'); |
| 54 |
information_category_node.html(""); |
58 |
information_category_node.html(""); |
| 55 |
if ( category.length > 0 ) { |
59 |
if ( category.length > 0 ) { |
| 56 |
information_category_node.html('This attribute will be only applied to the borrower\'s category "' + category + '"'); |
60 |
information_category_node.html(_("This attribute will be only applied to the patron\'s category") +' "' + category + '"'); |
| 57 |
} |
61 |
} |
| 58 |
if ( type == 'select' ) { |
62 |
if ( type == 'select' ) { |
| 59 |
var options = '<option value = ""></option>'; |
63 |
var options = '<option value = ""></option>'; |
|
Lines 70-76
Link Here
|
| 70 |
var li_node = $("li.attributes:last"); |
74 |
var li_node = $("li.attributes:last"); |
| 71 |
var li_clone = $(li_node).clone(); |
75 |
var li_clone = $(li_node).clone(); |
| 72 |
if ( $(li_clone).find("a.delete").length == 0 ) { |
76 |
if ( $(li_clone).find("a.delete").length == 0 ) { |
| 73 |
$(li_clone).append('[<a href="#" title="Delete" class="delete" onclick="del_attributes(this);return false;">X</a>]'); |
77 |
$(li_clone).append('<a href="#" title="Delete" class="delete clear-field" onclick="del_attributes(this);return false;">Delete</a>'); |
| 74 |
} |
78 |
} |
| 75 |
$(li_clone).find('select[name="patron_attributes"]').change(function() { |
79 |
$(li_clone).find('select[name="patron_attributes"]').change(function() { |
| 76 |
updateAttrValues(this); |
80 |
updateAttrValues(this); |
|
Lines 106-112
Link Here
|
| 106 |
<div id="breadcrumbs"> |
110 |
<div id="breadcrumbs"> |
| 107 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
111 |
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › |
| 108 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
112 |
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › |
| 109 |
<a href="/cgi-bin/koha/tools/modborrowers.pl">Patrons modification</a> |
113 |
<a href="/cgi-bin/koha/tools/modborrowers.pl">Batch patron modification</a> |
| 110 |
</div> |
114 |
</div> |
| 111 |
|
115 |
|
| 112 |
<div id="doc3" class="yui-t2"> |
116 |
<div id="doc3" class="yui-t2"> |
|
Lines 114-130
Link Here
|
| 114 |
<div id="yui-main"> |
118 |
<div id="yui-main"> |
| 115 |
<div class="yui-b"> |
119 |
<div class="yui-b"> |
| 116 |
[% IF ( op == 'show_form' ) %] |
120 |
[% IF ( op == 'show_form' ) %] |
| 117 |
<h1>Batch patrons modification</h1> |
121 |
<h1>Batch patron modification</h1> |
| 118 |
<form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl"> |
122 |
<form method="post" enctype="multipart/form-data" action="/cgi-bin/koha/tools/modborrowers.pl"> |
| 119 |
<fieldset class="rows"> |
123 |
<fieldset class="rows"> |
| 120 |
<legend>Use a file</legend> |
124 |
<legend>Use a file</legend> |
| 121 |
<label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /> |
125 |
<ol> |
|
|
126 |
<li><label for="uploadfile">File: </label> <input type="file" id="uploadfile" name="uploadfile" /></li> |
| 127 |
</ol> |
| 122 |
</fieldset> |
128 |
</fieldset> |
| 123 |
<fieldset class="rows"> |
129 |
<fieldset class="rows"> |
| 124 |
<legend>Or list cardnumbers one by one</legend> |
130 |
<legend>Or list cardnumbers one by one</legend> |
| 125 |
<ol> |
131 |
<ol> |
| 126 |
<li> |
132 |
<li> |
| 127 |
<label for="cardnumberlist">Carnumber list (one cardnumber per line): </label> |
133 |
<label for="cardnumberlist">Card number list (one cardnumber per line): </label> |
| 128 |
<textarea rows="10" cols="30" id="cardnumberlist" name="cardnumberlist">[% cardnumberlist %]</textarea> |
134 |
<textarea rows="10" cols="30" id="cardnumberlist" name="cardnumberlist">[% cardnumberlist %]</textarea> |
| 129 |
</li> |
135 |
</li> |
| 130 |
</ol> |
136 |
</ol> |
|
Lines 159-176
Link Here
|
| 159 |
|
165 |
|
| 160 |
[% IF ( op == 'show_results' ) %] |
166 |
[% IF ( op == 'show_results' ) %] |
| 161 |
[% IF ( errors ) %] |
167 |
[% IF ( errors ) %] |
| 162 |
Errors occured : |
168 |
<div class="dialog alert"> |
|
|
169 |
<h4>Errors occured:</h4> |
| 163 |
<ul class="warnings"> |
170 |
<ul class="warnings"> |
| 164 |
[% FOREACH error IN errors %] |
171 |
[% FOREACH error IN errors %] |
| 165 |
[% IF ( error.error == 'can_not_update' ) %] |
172 |
[% IF ( error.error == 'can_not_update' ) %] |
| 166 |
<li>Can not update borrower with borrowernumber [% error.borrowernumber %]</li> |
173 |
<li>Can not update patron with borrowernumber [% error.borrowernumber %]</li> |
| 167 |
[% ELSE %] |
174 |
[% ELSE %] |
| 168 |
<li>[% error.error %]</li> |
175 |
<li>[% error.error %]</li> |
| 169 |
[% END %] |
176 |
[% END %] |
| 170 |
[% END %] |
177 |
[% END %] |
| 171 |
</ul> |
178 |
</ul> |
|
|
179 |
</div> |
| 172 |
[% END %] |
180 |
[% END %] |
| 173 |
<br/> |
|
|
| 174 |
[% END %] |
181 |
[% END %] |
| 175 |
|
182 |
|
| 176 |
[% IF ( op == 'show' ) %] |
183 |
[% IF ( op == 'show' ) %] |
|
Lines 188-201
Link Here
|
| 188 |
[% IF ( op == 'show' ) %] |
195 |
[% IF ( op == 'show' ) %] |
| 189 |
<th> </th> |
196 |
<th> </th> |
| 190 |
[% END %] |
197 |
[% END %] |
|
|
198 |
<th>Card number</th> |
| 191 |
<th>Surname</th> |
199 |
<th>Surname</th> |
| 192 |
<th>Firstname</th> |
200 |
<th>Firstname</th> |
| 193 |
<th>Branchname</th> |
201 |
<th>Library</th> |
| 194 |
<th>Categorycode</th> |
202 |
<th>Category</th> |
| 195 |
<th>Cardnumber</th> |
203 |
<th>Registration date</th> |
| 196 |
<th>dateenrolled</th> |
204 |
<th>Expiry date</th> |
| 197 |
<th>dateexpiry</th> |
205 |
<th>Restricted</th> |
| 198 |
<th>debarred</th> |
|
|
| 199 |
[% FOREACH attrh IN attributes_header %] |
206 |
[% FOREACH attrh IN attributes_header %] |
| 200 |
<th>[% attrh.attribute %]</th> |
207 |
<th>[% attrh.attribute %]</th> |
| 201 |
[% END %] |
208 |
[% END %] |
|
Lines 207-217
Link Here
|
| 207 |
[% IF ( op == 'show' ) %] |
214 |
[% IF ( op == 'show' ) %] |
| 208 |
<td><input type="checkbox" name="borrowernumber" value="[% borrower.borrowernumber %]" checked="checked" /></td> |
215 |
<td><input type="checkbox" name="borrowernumber" value="[% borrower.borrowernumber %]" checked="checked" /></td> |
| 209 |
[% END %] |
216 |
[% END %] |
|
|
217 |
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">[% borrower.cardnumber %]</a></td> |
| 210 |
<td>[% borrower.surname %]</td> |
218 |
<td>[% borrower.surname %]</td> |
| 211 |
<td>[% borrower.firstname %]</td> |
219 |
<td>[% borrower.firstname %]</td> |
| 212 |
<td>[% borrower.branchname %]</td> |
220 |
<td>[% borrower.branchname %]</td> |
| 213 |
<td>[% borrower.categorycode %]</td> |
221 |
<td>[% borrower.categorycode %]</td> |
| 214 |
<td>[% borrower.cardnumber %]</td> |
|
|
| 215 |
<td>[% borrower.dateenrolled | $KohaDates %]</td> |
222 |
<td>[% borrower.dateenrolled | $KohaDates %]</td> |
| 216 |
<td>[% borrower.dateexpiry | $KohaDates %]</td> |
223 |
<td>[% borrower.dateexpiry | $KohaDates %]</td> |
| 217 |
<td>[% borrower.debarred | $KohaDates %]</td> |
224 |
<td>[% borrower.debarred | $KohaDates %]</td> |
|
Lines 237-243
Link Here
|
| 237 |
<ol> |
244 |
<ol> |
| 238 |
[% FOREACH field IN fields %] |
245 |
[% FOREACH field IN fields %] |
| 239 |
<li> |
246 |
<li> |
| 240 |
<label style="width:20em;"> |
247 |
[% IF ( field.mandatory ) %] |
|
|
248 |
<label for="[% field.name %]" class="required"> |
| 249 |
[% ELSE %] |
| 250 |
<label for="[% field.name %]"> |
| 251 |
[% END %] |
| 241 |
[% SWITCH ( field.name ) %] |
252 |
[% SWITCH ( field.name ) %] |
| 242 |
[% CASE 'surname' %] |
253 |
[% CASE 'surname' %] |
| 243 |
Surname: |
254 |
Surname: |
|
Lines 284-296
Link Here
|
| 284 |
[% END %] |
295 |
[% END %] |
| 285 |
[% IF ( field.type == 'date' ) %] |
296 |
[% IF ( field.type == 'date' ) %] |
| 286 |
<input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly="readonly" class="datepicker" /> |
297 |
<input type="text" name="[% field.name %]" id="[% field.name %]" value="" size="10" maxlength="10" readonly="readonly" class="datepicker" /> |
| 287 |
<a href="#" onclick="clearDate('[% field.name %]');return false;">X</a> |
298 |
<a href="#" class="clear-field" onclick="clearDate('[% field.name %]');return false;">Clear</a> |
| 288 |
[% END %] |
299 |
[% END %] |
| 289 |
</li> |
300 |
</li> |
| 290 |
[% END %] |
301 |
[% END %] |
| 291 |
[% IF ( patron_attributes_codes ) %] |
302 |
[% IF ( patron_attributes_codes ) %] |
| 292 |
<li class="attributes"> |
303 |
<li class="attributes"> |
| 293 |
<label style="width:20em;">Attribute: |
304 |
<label style="width:auto;">Attribute: |
| 294 |
<select name="patron_attributes"> |
305 |
<select name="patron_attributes"> |
| 295 |
[% FOREACH pac IN patron_attributes_codes %] |
306 |
[% FOREACH pac IN patron_attributes_codes %] |
| 296 |
<option value="[% pac.attribute_code %]" data-type="[% pac.type %]" data-category="[% pac.category_lib %]">[% pac.attribute_lib %]</option> |
307 |
<option value="[% pac.attribute_code %]" data-type="[% pac.type %]" data-category="[% pac.category_lib %]">[% pac.attribute_lib %]</option> |
|
Lines 299-306
Link Here
|
| 299 |
</label> |
310 |
</label> |
| 300 |
<input type="checkbox" title="check to delete this field" name="disable_input" value="attr0_value" /> |
311 |
<input type="checkbox" title="check to delete this field" name="disable_input" value="attr0_value" /> |
| 301 |
<span class="patron_attributes_value"></span> |
312 |
<span class="patron_attributes_value"></span> |
| 302 |
<a href="#" title="Add an attribute" onclick="add_attributes(); return false;">+</a> |
313 |
<a href="#" class="clone-field" title="Add an attribute" onclick="add_attributes(); return false;">New</a> |
| 303 |
<span class="information_category"></span> |
314 |
<span class="information_category hint" style="width:25%;float:right;"></span> |
| 304 |
</li> |
315 |
</li> |
| 305 |
[% END %] |
316 |
[% END %] |
| 306 |
</ol> |
317 |
</ol> |
|
Lines 314-321
Link Here
|
| 314 |
[% END %] |
325 |
[% END %] |
| 315 |
[% END %] |
326 |
[% END %] |
| 316 |
[% IF ( op == 'show_results' ) %] |
327 |
[% IF ( op == 'show_results' ) %] |
| 317 |
<br/> |
328 |
<p> |
| 318 |
<a href="/cgi-bin/koha/tools/modborrowers.pl" title="new Batch patrons modification">new Batch patrons modification</a> |
329 |
<a href="/cgi-bin/koha/tools/modborrowers.pl" title="New batch patrons modification">New batch patron modification</a> |
|
|
330 |
</p> |
| 319 |
[% END %] |
331 |
[% END %] |
| 320 |
</div> |
332 |
</div> |
| 321 |
</div> |
333 |
</div> |
| 322 |
- |
|
|