diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
index 437e558b13..e3a2468a64 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
@@ -343,7 +343,8 @@
[% IF bibitemloo.itemholdable %]
-
+
+
+ [% IF unholdable_items %]
+
+
+ [% END %]
+
[% END # / IF ( bibitemloo.itemholdable )%]
@@ -489,6 +506,12 @@
}
$(document).ready(function() {
+
+ $(".toggle_unholdable").click(function(e){
+ e.preventDefault();
+ $(".unholdable").toggle();
+ });
+
$("#hold-request-form").preventDoubleFormSubmit();
var copiesRowId = null;
var wasSpecific = false;
@@ -590,8 +613,8 @@
// If the user is *allowed* to choose a specific item
// The first one is preselected
- $("table.copiesrow").each(function(){
- var id = suffixOf($(this).attr("id"), "_");
+ $(".copiesrow table").each(function(){
+ var id = suffixOf($(this).closest('div').attr("id"), "_");
select_first_available(id);
});
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index 99de9a4dcb..4ce329962f 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -507,7 +507,7 @@ foreach my $biblioNum (@biblionumbers) {
my $issue = Koha::Checkouts->find( { itemnumber => $itemNum } );
if ( $issue ) {
$itemLoopIter->{dateDue} = output_pref({ dt => dt_from_string($issue->date_due, 'sql'), as_due_date => 1 });
- $itemLoopIter->{backgroundcolor} = 'onloan';
+ $itemLoopIter->{onloan} = 'onloan';
}
# checking reserve