Lines 16-21
Link Here
|
16 |
<body id="tools_batch_extend_due_dates" class="tools"> |
16 |
<body id="tools_batch_extend_due_dates" class="tools"> |
17 |
[% WRAPPER 'header.inc' %] |
17 |
[% WRAPPER 'header.inc' %] |
18 |
[% INCLUDE 'cat-search.inc' %] |
18 |
[% INCLUDE 'cat-search.inc' %] |
|
|
19 |
[% INCLUDE modals/batch_modify_hold_errors.inc %] |
19 |
[% END %] |
20 |
[% END %] |
20 |
|
21 |
|
21 |
[% WRAPPER 'sub-header.inc' %] |
22 |
[% WRAPPER 'sub-header.inc' %] |
Lines 251-257
Link Here
|
251 |
</aside> |
252 |
</aside> |
252 |
</div> <!-- /.col-sm-2 col-sm-pull-10 --> |
253 |
</div> <!-- /.col-sm-2 col-sm-pull-10 --> |
253 |
</div> <!-- /.row --> |
254 |
</div> <!-- /.row --> |
254 |
|
|
|
255 |
[% MACRO jsinclude BLOCK %] |
255 |
[% MACRO jsinclude BLOCK %] |
256 |
[% Asset.js("js/tools-menu.js") | $raw %] |
256 |
[% Asset.js("js/tools-menu.js") | $raw %] |
257 |
[% INCLUDE 'calendar.inc' %] |
257 |
[% INCLUDE 'calendar.inc' %] |
Lines 286-291
Link Here
|
286 |
})); |
286 |
})); |
287 |
|
287 |
|
288 |
$("#process").on('submit', function(e) { |
288 |
$("#process").on('submit', function(e) { |
|
|
289 |
var errors = []; |
289 |
var reserve_ids = $("input[type=checkbox][name='hold_id']:checked"); |
290 |
var reserve_ids = $("input[type=checkbox][name='hold_id']:checked"); |
290 |
|
291 |
|
291 |
var new_pickup_loc = $("#new_pickup_loc").val(); |
292 |
var new_pickup_loc = $("#new_pickup_loc").val(); |
Lines 294-300
Link Here
|
294 |
|
295 |
|
295 |
if ( reserve_ids.length == 0 ) { |
296 |
if ( reserve_ids.length == 0 ) { |
296 |
e.preventDefault(); |
297 |
e.preventDefault(); |
297 |
alert(_("Please select at least one hold to process.")); |
298 |
errors.push(_("Please select at least one hold to process.")); |
298 |
return false; |
299 |
return false; |
299 |
} |
300 |
} |
300 |
if( new_pickup_loc || new_suspend_status ){ |
301 |
if( new_pickup_loc || new_suspend_status ){ |
Lines 302-311
Link Here
|
302 |
if($(this).parents("tr").children(".found_status").data("found") != ""){ |
303 |
if($(this).parents("tr").children(".found_status").data("found") != ""){ |
303 |
e.preventDefault(); |
304 |
e.preventDefault(); |
304 |
if( new_suspend_status ){ |
305 |
if( new_suspend_status ){ |
305 |
alert(_("One or more holds have found status and can't be suspended.")); |
306 |
errors.push(_("One or more holds have found status and can't be suspended.")); |
306 |
} |
307 |
} |
307 |
if( new_pickup_loc ){ |
308 |
if( new_pickup_loc ){ |
308 |
alert(_("One or more holds have found status and their pick up location can't be changed.")); |
309 |
errors.push(_("One or more holds have found status and their pick up location can't be changed.")); |
309 |
} |
310 |
} |
310 |
return false; |
311 |
return false; |
311 |
} |
312 |
} |
Lines 313-319
Link Here
|
313 |
} |
314 |
} |
314 |
if( ( !new_suspend_status || new_suspend_status == "not_suspended") && new_suspend_date ){ |
315 |
if( ( !new_suspend_status || new_suspend_status == "not_suspended") && new_suspend_date ){ |
315 |
e.preventDefault(); |
316 |
e.preventDefault(); |
316 |
alert(_("You have to suspend holds if new suspend until date is set.")); |
317 |
errors.push(_("You have to suspend holds if new suspend until date is set.")); |
|
|
318 |
return false; |
319 |
} |
320 |
|
321 |
if (errors.length > 0) { |
322 |
e.preventDefault(); |
323 |
$("#errorList").html(errors.map(error => `<li>${error}</li>`).join("")); |
324 |
$("#errorModal").modal('show'); |
317 |
return false; |
325 |
return false; |
318 |
} |
326 |
} |
319 |
|
327 |
|
320 |
- |
|
|