View | Details | Raw Unified | Return to bug 15682
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt (-5 / +8 lines)
Lines 64-74 Link Here
64
     */
64
     */
65
    function MergeItems() {
65
    function MergeItems() {
66
     var checkboxes = $("input:checkbox:checked");
66
     var checkboxes = $("input:checkbox:checked");
67
        var nbCheckbox = checkboxes.length;
67
     if (checkboxes.length < 2) {
68
     if (nbCheckbox != 2) {
68
         alert(_("At least two records must be selected for merging."));
69
         alert(_("Two records must be selected for merging."));
70
     } else {
69
     } else {
71
         location.href='/cgi-bin/koha/cataloguing/merge.pl?biblionumber=' + checkboxes[0].value + '&amp;biblionumber=' + checkboxes[1].value;
70
         var params = [];
71
         $(checkboxes).each(function() {
72
             params.push('biblionumber=' + $(this).val());
73
         });
74
         var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&');
75
         location.href = url;
72
     }
76
     }
73
     return false;
77
     return false;
74
    }
78
    }
75
- 

Return to bug 15682