@@ -, +, @@ --- .../bootstrap/en/modules/opac-reserve.tt | 27 ++++++++++++++----- 1 file changed, 20 insertions(+), 7 deletions(-) --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt @@ -649,7 +649,10 @@ $(".confirmjs:checked").each(function() { var biblioNum = $(this).val(); biblionumbers += biblioNum + "/"; - selections += biblioNum + "/"; + + var select_bib = biblioNum; + var select_pickup; + var select_items = [] // If required hold note is empty, make it visible if( $("#holdnotes_"+biblioNum).attr( 'required' ) && $("#holdnotes_"+biblioNum).val() == '' ) { @@ -661,23 +664,33 @@ // 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(MSG_NO_ITEM_SELECTED); 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 + "/"; + }); } - selections += "/"; + else { + selections += select_bib + "/" + "/" + select_pickup + "/"; + } + return true; }); --