Lines 61-67
Link Here
|
61 |
<li> |
61 |
<li> |
62 |
<label for="branchcodes">Libraries:</label> |
62 |
<label for="branchcodes">Libraries:</label> |
63 |
<select name="branchcodes" id="branchcodes" multiple="multiple"> |
63 |
<select name="branchcodes" id="branchcodes" multiple="multiple"> |
64 |
[% PROCESS options_for_libraries libraries => Branches.all() %] |
64 |
[% PROCESS options_for_libraries libraries => Branches.all(selected => "") %] |
65 |
</select> |
65 |
</select> |
66 |
</li> |
66 |
</li> |
67 |
<li> |
67 |
<li> |
Lines 108-113
Link Here
|
108 |
<form action="/cgi-bin/koha/tools/batch_modify_holds.pl" method="post" id="process"> |
108 |
<form action="/cgi-bin/koha/tools/batch_modify_holds.pl" method="post" id="process"> |
109 |
[% INCLUDE 'csrf-token.inc' %] |
109 |
[% INCLUDE 'csrf-token.inc' %] |
110 |
[% IF holds.count %] |
110 |
[% IF holds.count %] |
|
|
111 |
<div><p>Found [% holds.count | html %][% IF holds.count > 1 %] holds [% ELSE %] hold [% END %]to modify.</p><div> |
111 |
<div class="page-section"> |
112 |
<div class="page-section"> |
112 |
<div class="btn-toolbar selections-toolbar"> |
113 |
<div class="btn-toolbar selections-toolbar"> |
113 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
114 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
Lines 119-124
Link Here
|
119 |
<th> </th> |
120 |
<th> </th> |
120 |
<th>Expiration date</th> |
121 |
<th>Expiration date</th> |
121 |
<th>Patron expiration date</th> |
122 |
<th>Patron expiration date</th> |
|
|
123 |
<th>Title</title> |
124 |
<th>Barcode</th> |
122 |
<th>Status</th> |
125 |
<th>Status</th> |
123 |
<th>Hold pickup library</th> |
126 |
<th>Hold pickup library</th> |
124 |
<th>Suspended</th> |
127 |
<th>Suspended</th> |
Lines 128-137
Link Here
|
128 |
</thead> |
131 |
</thead> |
129 |
<tbody> |
132 |
<tbody> |
130 |
[% FOREACH hold IN holds %] |
133 |
[% FOREACH hold IN holds %] |
131 |
<tr> |
134 |
<tr [% IF hold.found %]class="highlighted-row"[% END %]> |
132 |
<td><input type="checkbox" name="hold_id" value="[% hold.reserve_id | html %]"/></td> |
135 |
<td><input type="checkbox" name="hold_id" value="[% hold.reserve_id | html %]"/></td> |
133 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
136 |
<td>[% hold.expirationdate | $KohaDates %]</td> |
134 |
<td>[% hold.patron_expiration_date | $KohaDates %]</td> |
137 |
<td>[% hold.patron_expiration_date | $KohaDates %]</td> |
|
|
138 |
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.item.biblio.biblionumber | uri %]">[% hold.item.biblio.title | html %]</a></td> |
139 |
<td><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% hold.itemnumber | uri %]&biblionumber=[% hold.item.biblio.biblionumber | uri %]&bi=[% hold.item.biblio.biblionumber | uri %]#item[% hold.itemnumber | uri %]">[% hold.item.barcode | html %]</a></td> |
135 |
<td class="found_status" data-found="[% hold.found | html %]"> |
140 |
<td class="found_status" data-found="[% hold.found | html %]"> |
136 |
[% IF hold.found == "T" %] |
141 |
[% IF hold.found == "T" %] |
137 |
In transit |
142 |
In transit |
Lines 169-176
Link Here
|
169 |
<input type="text" id="new_expiration_date" name="new_expiration_date" class="flatpickr" data-flatpickr-futuredate="true"/> |
174 |
<input type="text" id="new_expiration_date" name="new_expiration_date" class="flatpickr" data-flatpickr-futuredate="true"/> |
170 |
</td> |
175 |
</td> |
171 |
<td> |
176 |
<td> |
172 |
<select name="new_pickup_loc" id="new_pickup_loc"> |
177 |
<select id="new_pickup_loc" name="new_pickup_loc"> |
173 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations({ selected => hold.branchcode }) %] |
178 |
<option value="" selected="selected"></option> |
|
|
179 |
[% PROCESS options_for_libraries libraries => Branches.pickup_locations(selected = "") %] |
174 |
</select> |
180 |
</select> |
175 |
</td> |
181 |
</td> |
176 |
<td> |
182 |
<td> |
Lines 206-215
Link Here
|
206 |
Holds have been modified! |
212 |
Holds have been modified! |
207 |
</div> |
213 |
</div> |
208 |
<div class="page-section"> |
214 |
<div class="page-section"> |
209 |
<div class="btn-toolbar selections-toolbar"> |
|
|
210 |
<a id="selectall" href="#"><i class="fa fa-check"></i> Select all</a> |
211 |
<a id="clearall" href="#"><i class="fa fa-remove"></i> Clear all</a> |
212 |
</div> |
213 |
<table id="holds"> |
215 |
<table id="holds"> |
214 |
<thead> |
216 |
<thead> |
215 |
<tr> |
217 |
<tr> |
Lines 282-287
Link Here
|
282 |
$("#process").on('submit', function(e) { |
284 |
$("#process").on('submit', function(e) { |
283 |
var reserve_ids = $("input[type=checkbox][name='hold_id']:checked"); |
285 |
var reserve_ids = $("input[type=checkbox][name='hold_id']:checked"); |
284 |
|
286 |
|
|
|
287 |
var new_pickup_loc = $("#new_pickup_loc").val(); |
285 |
var new_suspend_status = $("#new_suspend_status").val(); |
288 |
var new_suspend_status = $("#new_suspend_status").val(); |
286 |
var new_suspend_date = $("#new_suspend_date").val(); |
289 |
var new_suspend_date = $("#new_suspend_date").val(); |
287 |
|
290 |
|
Lines 290-300
Link Here
|
290 |
alert(_("Please select at least one hold to process.")); |
293 |
alert(_("Please select at least one hold to process.")); |
291 |
return false; |
294 |
return false; |
292 |
} |
295 |
} |
293 |
if( new_suspend_status ){ |
296 |
if( new_pickup_loc || new_suspend_status ){ |
294 |
reserve_ids.each(function(){ |
297 |
reserve_ids.each(function(){ |
295 |
if($(this).parents("tr").children(".found_status").data("found") != ""){ |
298 |
if($(this).parents("tr").children(".found_status").data("found") != ""){ |
296 |
e.preventDefault(); |
299 |
e.preventDefault(); |
297 |
alert(_("One or more holds have found status and can't be suspended.")); |
300 |
if( new_suspend_status ){ |
|
|
301 |
alert(_("One or more holds have found status and can't be suspended.")); |
302 |
} |
303 |
if( new_pickup_loc ){ |
304 |
alert(_("One or more holds have found status and their pick up location can't be changed.")); |
305 |
} |
298 |
return false; |
306 |
return false; |
299 |
} |
307 |
} |
300 |
}) |
308 |
}) |