Lines 1248-1254
Link Here
|
1248 |
<a class="btn btn-default btn-xs dropdown-toggle move_selected_holds" id="item_record_choice" role="button" data-bs-toggle="dropdown" href="#" aria-expanded="false"></a> |
1248 |
<a class="btn btn-default btn-xs dropdown-toggle move_selected_holds" id="item_record_choice" role="button" data-bs-toggle="dropdown" href="#" aria-expanded="false"></a> |
1249 |
<ul class="dropdown-menu" role="menu" aria-labelledby="item_record_choice" style=""> |
1249 |
<ul class="dropdown-menu" role="menu" aria-labelledby="item_record_choice" style=""> |
1250 |
<li><a class="dropdown-item move_hold_item" href="#">Item level holds to a different item</a></li> |
1250 |
<li><a class="dropdown-item move_hold_item" href="#">Item level holds to a different item</a></li> |
1251 |
<li><a class="dropdown-item move_hold_record" href="#">Record level holds to a different record</a></li> |
1251 |
<li><a class="dropdown-item move_hold_biblio" href="#">Record level holds to a different record</a></li> |
1252 |
</ul> |
1252 |
</ul> |
1253 |
</div> |
1253 |
</div> |
1254 |
[% END %] |
1254 |
[% END %] |
Lines 1450-1488
Link Here
|
1450 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
1450 |
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> |
1451 |
</div> |
1451 |
</div> |
1452 |
<div class="modal-body"> |
1452 |
<div class="modal-body"> |
1453 |
<div id="move_hold_item_selection"> |
1453 |
<div id="move_hold_bibio_search" class="alert alert-danger" style="display:none;"></div> |
1454 |
<h3>1. Review holds to move</h3> |
|
|
1455 |
<table class="table table-striped"> |
1456 |
<thead> |
1457 |
<tr> |
1458 |
<th>Hold ID</th> |
1459 |
<th>Original hold</th> |
1460 |
<th>Problem</th> |
1461 |
</tr> |
1462 |
</thead> |
1463 |
<tbody> </tbody> |
1464 |
</table> |
1465 |
</div> |
1466 |
<hr /> |
1467 |
<div id="move_hold_biblio_search" class="alert alert-danger" style="display:none;"></div> |
1468 |
<form id="biblioSearchForm"> |
1454 |
<form id="biblioSearchForm"> |
1469 |
<div id="move_hold_item_searchform"> |
1455 |
<div id="move_hold_biblio_searchform"> |
1470 |
<h3>2. Enter the bibloinumber of the new hold target: </h3> |
1456 |
<h3>Enter the biblionumber of new hold target: </h3> |
1471 |
<fieldset class="action"> |
1457 |
<fieldset class="action d-flex"> |
1472 |
<input type="text" class="form-control" name="biblio_id" id="biblio_id" required /> |
1458 |
<input type="text" class="form-control" name="biblio_id" id="biblio_id" required /> |
1473 |
<button type="submit" class="btn btn-default mt-3">Search</button> |
1459 |
<button type="submit" class="btn btn-default">Search</button> |
1474 |
</fieldset> |
1460 |
</fieldset> |
1475 |
</div> |
1461 |
</div> |
1476 |
</form> |
1462 |
</form> |
1477 |
<form id="move_hold_biblio_form" method="post" action="request.pl"> |
1463 |
<form id="move_hold_biblio_form" method="post" action="request.pl"> |
|
|
1464 |
[% INCLUDE 'csrf-token.inc' %] |
1465 |
<input type="hidden" name="op" value="cud-move_hold_biblio" /> |
1466 |
<input type="hidden" name="original_biblionumber" value="[% biblio.biblionumber | html %]" /> |
1478 |
<div id="biblioResultMessage" class="mt-3"> </div> |
1467 |
<div id="biblioResultMessage" class="mt-3"> </div> |
1479 |
<div id="move_hold_biblio_confirm" style="display:none;"> |
1468 |
<div id="move_hold_biblio_selection"> |
1480 |
<h3>3. Confirm moving of holds:</h3> |
1469 |
<h3>Review holds to move</h3> |
1481 |
[% INCLUDE 'csrf-token.inc' %] |
1470 |
<table class="table table-striped"> |
1482 |
<input type="hidden" name="op" value="cud-move_hold_biblio" /> |
1471 |
<thead> |
1483 |
<button type="submit" class="btn btn-primary mt-3">Move selected holds</button> |
1472 |
<tr> |
1484 |
<input type="hidden" name="original_biblionumber" value="[% biblio.biblionumber | html %]" /> |
1473 |
<th></th> |
|
|
1474 |
<th>Hold ID</th> |
1475 |
<th>Original hold</th> |
1476 |
<th>Problem</th> |
1477 |
</tr> |
1478 |
</thead> |
1479 |
<tbody> </tbody> |
1480 |
</table> |
1485 |
</div> |
1481 |
</div> |
|
|
1482 |
<button id="move_hold_biblio_confirm" type="submit" class="btn btn-primary" disabled="disabled">Move selected holds</button> |
1486 |
</form> |
1483 |
</form> |
1487 |
</div> |
1484 |
</div> |
1488 |
<div class="modal-footer"> |
1485 |
<div class="modal-footer"> |
Lines 1841-1846
Link Here
|
1841 |
|
1838 |
|
1842 |
$("#biblioSearchForm").on("submit", function (event) { |
1839 |
$("#biblioSearchForm").on("submit", function (event) { |
1843 |
event.preventDefault(); |
1840 |
event.preventDefault(); |
|
|
1841 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1844 |
|
1842 |
|
1845 |
let biblioID = $("#biblio_id").val(); |
1843 |
let biblioID = $("#biblio_id").val(); |
1846 |
let apiUrl = `/api/v1/items?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
1844 |
let apiUrl = `/api/v1/items?q={"biblio_id":"${encodeURIComponent(biblioID)}"}`; |
Lines 1884-1892
Link Here
|
1884 |
$(document).on("change", 'input[name="new_biblionumber"]', function() { |
1882 |
$(document).on("change", 'input[name="new_biblionumber"]', function() { |
1885 |
$('input[name="new_biblionumber"]').not(this).prop("checked", false); |
1883 |
$('input[name="new_biblionumber"]').not(this).prop("checked", false); |
1886 |
if ( $('input[name="new_biblionumber"]:checked').length ){ |
1884 |
if ( $('input[name="new_biblionumber"]:checked').length ){ |
1887 |
$('#move_hold_biblio_confirm').show(); |
1885 |
$('#move_hold_biblio_confirm').prop('disabled' , false ); |
1888 |
} else { |
1886 |
} else { |
1889 |
$('#move_hold_biblio_confirm').hide(); |
1887 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
1890 |
} |
1888 |
} |
1891 |
}); |
1889 |
}); |
1892 |
|
1890 |
|
Lines 2005-2023
Link Here
|
2005 |
let error_message = $(this).data('item_level_hold') ? "" : _("Cannot move a waiting or record level hold"); |
2003 |
let error_message = $(this).data('item_level_hold') ? "" : _("Cannot move a waiting or record level hold"); |
2006 |
let found_status = $(this).data('found'); |
2004 |
let found_status = $(this).data('found'); |
2007 |
if ( item_level_hold ) { |
2005 |
if ( item_level_hold ) { |
2008 |
$('#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>`) |
2006 |
$('#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>`) |
2009 |
} else { |
2007 |
} else { |
2010 |
$('#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>`) |
2008 |
$('#move_hold_item_selection table').append(`<tr><td><input type="checkbox" name="move_hold_id" value="${reserve_id}" disabled /></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>`) |
2011 |
} |
2009 |
} |
2012 |
}); |
2010 |
}); |
2013 |
} |
2011 |
} |
2014 |
}); |
2012 |
}); |
2015 |
|
2013 |
|
2016 |
$('.move_hold_record').click(function(e) { |
2014 |
$('.move_hold_biblio').click(function(e) { |
2017 |
e.preventDefault(); |
2015 |
e.preventDefault(); |
|
|
2016 |
$('#move_hold_biblio_confirm').prop('disabled' , true ); |
2018 |
if($('.holds_table .select_hold:checked').length) { |
2017 |
if($('.holds_table .select_hold:checked').length) { |
2019 |
$('#biblioResultMessage').empty(); |
2018 |
$('#biblioResultMessage').empty(); |
2020 |
$('#move_hold_item_selection table tbody').empty(); |
2019 |
$('#move_hold_biblio_selection table tbody').empty(); |
2021 |
$('#moveHoldBiblioModal').modal('show'); |
2020 |
$('#moveHoldBiblioModal').modal('show'); |
2022 |
$('.select_hold:checked').each( function() { |
2021 |
$('.select_hold:checked').each( function() { |
2023 |
let reserve_id = $(this).data('id'); |
2022 |
let reserve_id = $(this).data('id'); |
Lines 2026-2034
Link Here
|
2026 |
let item_level_hold = $(this).data('item_level_hold'); |
2025 |
let item_level_hold = $(this).data('item_level_hold'); |
2027 |
let error_message = $(this).data('item_level_hold') ? _("Cannot move a waiting or item level hold") : ""; |
2026 |
let error_message = $(this).data('item_level_hold') ? _("Cannot move a waiting or item level hold") : ""; |
2028 |
let found_status = $(this).data('found'); |
2027 |
let found_status = $(this).data('found'); |
2029 |
$('#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></td><td>${error_message}</td></tr>`) |
|
|
2030 |
if ( !item_level_hold ) { |
2028 |
if ( !item_level_hold ) { |
2031 |
$('#move_hold_biblio_form').append(`<input type="hidden" name="hold_id" value="${reserve_id}">`); |
2029 |
$('#move_hold_biblio_selection table').append(`<tr><td><input type="checkbox" name="move_hold_id" value="${reserve_id}" checked /><td>${reserve_id}</td><td>Biblionumber: <a target="_blank" href="/cgi-bin/koha/reserve/request.pl?biblionumber=${reserve_biblionumber}">${reserve_biblionumber}</a></td><td>${error_message}</td></tr>`) |
|
|
2030 |
} else { |
2031 |
$('#move_hold_biblio_selection table').append(`<tr><td><input type="checkbox" name="move_hold_id" value="${reserve_id}" disabled /><td>${reserve_id}</td><td>Biblionumber: <a target="_blank" href="/cgi-bin/koha/reserve/request.pl?biblionumber=${reserve_biblionumber}">${reserve_biblionumber}</a></td><td>${error_message}</td></tr>`) |
2032 |
|
2032 |
} |
2033 |
} |
2033 |
}); |
2034 |
}); |
2034 |
} |
2035 |
} |
2035 |
- |
|
|