@@ -, +, @@
OPAC
---
.../bootstrap/en/modules/opac-reserve.tt | 26 +++++++++++++------
1 file changed, 18 insertions(+), 8 deletions(-)
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
+++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt
@@ -397,7 +397,7 @@
[% END %]
-
+
[% ELSE %]
[% SET unholdable_items = 1 %]
[% IF ( itemLoo.checkout ) %]
@@ -656,7 +656,9 @@
$(".confirmjs:checked").each(function() {
var biblioNum = $(this).val();
biblionumbers += biblioNum + "/";
- selections += biblioNum + "/";
+ let select_bib = biblioNum;
+ let select_pickup;
+ let select_items = [];
// If required hold note is empty, make it visible
if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) {
@@ -682,23 +684,31 @@
// If the 'specific copy' radio button is checked
if ($("#reqspecific_" + biblioNum + ":checked").size() > 0) {
// Find the selected copy
- var item = $(".checkitem_" + biblioNum + ":checked");
- if ($(item).size() == 0) {
+ var items = $(".checkitem_" + biblioNum + ":checked");
+ if ($(items).size() == 0) {
alert( _("Expecting a specific item selection.") );
badBib = biblioNum;
return false;
} else {
- selections += $(item).val();
+ items.each( function(index,el){
+ select_items.push( $(el).val() );
+ });
}
}
- selections += "/";
// Add the pickup location
var branchSel = $("#branch_" + biblioNum);
if (branchSel.size() > 0) {
- selections += $(branchSel).val();
+ select_pickup = $(branchSel).val();
+ }
+ if ( select_items.length > 0 ){
+ select_items.forEach( function(item_value,index){
+ selections += select_bib + "/" + item_value + "/" + select_pickup + "/";
+ });
+ }
+ else {
+ selections += select_bib + "/" + "/" + select_pickup + "/";
}
- selections += "/";
return true;
});
--
|