Lines 1433-1471
Link Here
|
1433 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
1433 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
1434 |
</div> |
1434 |
</div> |
1435 |
<div class="modal-body"> |
1435 |
<div class="modal-body"> |
1436 |
<div id="move_hold_item_selection"> |
|
|
1437 |
<h3>1. Review holds to move</h3> |
1438 |
<table class="table table-striped"> |
1439 |
<thead> |
1440 |
<tr> |
1441 |
<th>Hold ID</th> |
1442 |
<th>Original hold</th> |
1443 |
<th>Problem</th> |
1444 |
</tr> |
1445 |
</thead> |
1446 |
<tbody> </tbody> |
1447 |
</table> |
1448 |
</div> |
1449 |
<hr /> |
1450 |
<div id="move_hold_item_search" class="alert alert-danger" style="display:none;"></div> |
1436 |
<div id="move_hold_item_search" class="alert alert-danger" style="display:none;"></div> |
1451 |
<form id="itemSearchForm"> |
1437 |
<form id="itemSearchForm"> |
1452 |
<div id="move_hold_item_searchform"> |
1438 |
<div id="move_hold_item_searchform"> |
1453 |
<h3>2. Enter the item barcode of new hold target: </h3> |
1439 |
<h3>Enter the item barcode of new hold target: </h3> |
1454 |
<fieldset class="action"> |
1440 |
<fieldset class="action d-flex"> |
1455 |
<input type="text" class="form-control" name="external_id" id="external_id" required /> |
1441 |
<input type="text" class="form-control" name="external_id" id="external_id" required /> |
1456 |
<button type="submit" class="btn btn-default mt-3">Search</button> |
1442 |
<button type="submit" class="btn btn-default">Search</button> |
1457 |
</fieldset> |
1443 |
</fieldset> |
1458 |
</div> |
1444 |
</div> |
1459 |
</form> |
1445 |
</form> |
1460 |
<form id="move_hold_item_form" method="post" action="request.pl"> |
1446 |
<form id="move_hold_item_form" method="post" action="request.pl"> |
|
|
1447 |
[% INCLUDE 'csrf-token.inc' %] |
1448 |
<input type="hidden" name="op" value="cud-move_hold_item" /> |
1449 |
<input type="hidden" name="original_biblionumber" value="[% biblio.biblionumber | html %]" /> |
1461 |
<div id="itemResultMessage" class="mt-3"> </div> |
1450 |
<div id="itemResultMessage" class="mt-3"> </div> |
1462 |
<div id="move_hold_item_confirm" style="display:none;"> |
1451 |
<div id="move_hold_item_selection"> |
1463 |
<h3>3. Confirm moving of holds:</h3> |
1452 |
<h3>Review holds to move</h3> |
1464 |
[% INCLUDE 'csrf-token.inc' %] |
1453 |
<table class="table table-striped"> |
1465 |
<input type="hidden" name="op" value="cud-move_hold_item" /> |
1454 |
<thead> |
1466 |
<button type="submit" class="btn btn-primary mt-3">Move selected holds</button> |
1455 |
<tr> |
1467 |
<input type="hidden" name="original_biblionumber" value="[% biblio.biblionumber %]" /> |
1456 |
<th></th> |
|
|
1457 |
<th>Hold ID</th> |
1458 |
<th>Original hold</th> |
1459 |
<th>Problem</th> |
1460 |
</tr> |
1461 |
</thead> |
1462 |
<tbody> </tbody> |
1463 |
</table> |
1468 |
</div> |
1464 |
</div> |
|
|
1465 |
<button id="move_hold_item_confirm" type="submit" class="btn btn-primary" disabled="disabled">Move selected holds</button> |
1469 |
</form> |
1466 |
</form> |
1470 |
</div> |
1467 |
</div> |
1471 |
<div class="modal-footer"> |
1468 |
<div class="modal-footer"> |
Lines 1513-1519
Link Here
|
1513 |
[% INCLUDE 'csrf-token.inc' %] |
1510 |
[% INCLUDE 'csrf-token.inc' %] |
1514 |
<input type="hidden" name="op" value="cud-move_hold_biblio" /> |
1511 |
<input type="hidden" name="op" value="cud-move_hold_biblio" /> |
1515 |
<button type="submit" class="btn btn-primary mt-3">Move selected holds</button> |
1512 |
<button type="submit" class="btn btn-primary mt-3">Move selected holds</button> |
1516 |
<input type="hidden" name="original_biblionumber" value="[% biblio.biblionumber %]" /> |
1513 |
<input type="hidden" name="original_biblionumber" value="[% biblio.biblionumber | html %]" /> |
1517 |
</div> |
1514 |
</div> |
1518 |
</form> |
1515 |
</form> |
1519 |
</div> |
1516 |
</div> |
Lines 1839-1844
Link Here
|
1839 |
$(document).ready(function() { |
1836 |
$(document).ready(function() { |
1840 |
$("#itemSearchForm").on("submit", function (event) { |
1837 |
$("#itemSearchForm").on("submit", function (event) { |
1841 |
event.preventDefault(); |
1838 |
event.preventDefault(); |
|
|
1839 |
$('#move_hold_item_confirm').prop('disabled' , true ); |
1842 |
|
1840 |
|
1843 |
let externalID = $("#external_id").val(); |
1841 |
let externalID = $("#external_id").val(); |
1844 |
let apiUrl = `/api/v1/items?external_id=${encodeURIComponent(externalID)}`; |
1842 |
let apiUrl = `/api/v1/items?external_id=${encodeURIComponent(externalID)}`; |
Lines 1908-1916
Link Here
|
1908 |
$(document).on("change", 'input[name="new_itemnumber"]', function() { |
1906 |
$(document).on("change", 'input[name="new_itemnumber"]', function() { |
1909 |
$('input[name="new_itemnumber"]').not(this).prop("checked", false); |
1907 |
$('input[name="new_itemnumber"]').not(this).prop("checked", false); |
1910 |
if ( $('input[name="new_itemnumber"]:checked').length ){ |
1908 |
if ( $('input[name="new_itemnumber"]:checked').length ){ |
1911 |
$('#move_hold_item_confirm').show(); |
1909 |
$('#move_hold_item_confirm').prop( 'disabled' , false ); |
1912 |
} else { |
1910 |
} else { |
1913 |
$('#move_hold_item_confirm').hide(); |
1911 |
$('#move_hold_item_confirm').prop( 'disabled' , true ); |
1914 |
} |
1912 |
} |
1915 |
}); |
1913 |
}); |
1916 |
|
1914 |
|
Lines 2049-2054
Link Here
|
2049 |
|
2047 |
|
2050 |
$('.move_hold_item').click(function(e) { |
2048 |
$('.move_hold_item').click(function(e) { |
2051 |
e.preventDefault(); |
2049 |
e.preventDefault(); |
|
|
2050 |
$('#move_hold_item_confirm').prop('disabled' , true ); |
2052 |
if($('.holds_table .select_hold:checked').length) { |
2051 |
if($('.holds_table .select_hold:checked').length) { |
2053 |
$('#itemResultMessage').empty(); |
2052 |
$('#itemResultMessage').empty(); |
2054 |
$('#move_hold_item_selection table tbody').empty(); |
2053 |
$('#move_hold_item_selection table tbody').empty(); |
Lines 2060-2068
Link Here
|
2060 |
let item_level_hold = $(this).data('item_level_hold'); |
2059 |
let item_level_hold = $(this).data('item_level_hold'); |
2061 |
let error_message = $(this).data('item_level_hold') ? "" : _("Cannot move a waiting or record level hold"); |
2060 |
let error_message = $(this).data('item_level_hold') ? "" : _("Cannot move a waiting or record level hold"); |
2062 |
let found_status = $(this).data('found'); |
2061 |
let found_status = $(this).data('found'); |
2063 |
$('#move_hold_item_selection table').append(`<tr><td>${reserve_id}</td><td>Biblionumber: <a target="_blank" href="/cgi-bin/koha/reserve/request.pl?biblionumber=${reserve_biblionumber}">${reserve_biblionumber}</a> Itemnumber: <a target="_blank" href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=${reserve_biblionumber}#item${reserve_itemnumber}">${reserve_itemnumber}</a></td><td>${error_message}</td></tr>`) |
|
|
2064 |
if ( item_level_hold ) { |
2062 |
if ( item_level_hold ) { |
2065 |
$('#move_hold_item_form').append(`<input type="hidden" name="hold_id" value="${reserve_id}">`); |
2063 |
$('#move_hold_item_selection table').append(`<tr><td><input type="checkbox" name="move_hold_id" value="${reserve_id}" checked/></td><td>${reserve_id}</td><td>Biblionumber: <a target="_blank" href="/cgi-bin/koha/reserve/request.pl?biblionumber=${reserve_biblionumber}">${reserve_biblionumber}</a> Itemnumber: <a target="_blank" href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=${reserve_biblionumber}#item${reserve_itemnumber}">${reserve_itemnumber}</a></td><td>${error_message}</td></tr>`) |
|
|
2064 |
} else { |
2065 |
$('#move_hold_item_selection table').append(`<tr><td><input type="checkbox" name="move_hold_id" value="${reserve_id}" checked/></td><td>${reserve_id}</td><td>Biblionumber: <a target="_blank" href="/cgi-bin/koha/reserve/request.pl?biblionumber=${reserve_biblionumber}">${reserve_biblionumber}</a> Itemnumber: <a target="_blank" href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=${reserve_biblionumber}#item${reserve_itemnumber}">${reserve_itemnumber}</a></td><td>${error_message}</td></tr>`) |
2066 |
} |
2066 |
} |
2067 |
}); |
2067 |
}); |
2068 |
} |
2068 |
} |