From 9550e37fc66402500adf8bca7a1c90ee0104cdd0 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 --- .../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 48f7b39a6a..7383f0d269 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt @@ -199,15 +199,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