From 9f1e23735f46a8b014d4a8983796f1b8b37cc9b4 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 28 Mar 2016 20:09:01 +0000 Subject: [PATCH] Bug 15682 - Only allow merging of 2 or more records form lsits (for consistency) Test as above but on shelves.pl Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher (cherry picked from commit 9550e37fc66402500adf8bca7a1c90ee0104cdd0) Signed-off-by: Julian Maurice --- .../intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt index 80ddb2fbca..e6113dece7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -197,15 +197,15 @@ $(document).ready(function(){ */ function MergeItems() { var checkboxes = $("input:checkbox:checked"); - if (checkboxes.length > 0) { + if (checkboxes.length < 2) { + alert(_("At least two records must be selected for merging.")); + } else { var params = []; $(checkboxes).each(function() { params.push('biblionumber=' + $(this).val()); }); var url = '/cgi-bin/koha/cataloguing/merge.pl?' + params.join('&'); location.href = url; - } else { - alert(_("You must select at least one record")); } return false; } -- 2.39.5