@@ -, +, @@ the single record. The JS alert message will inform that "Please select at least label to delete." again. the batch and should that be desired action to choose the 'Delete batch' option from the toolbar. --- .../intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -19,6 +19,7 @@ function Remove() { items = new Array; item_num = new Array; + if(document.items.action.length > 0) { for (var i=0; i < document.items.action.length; i++) { if (document.items.action[i].checked) { @@ -26,16 +27,15 @@ item_num.push(i+1); } } - if (items.length < 1) { - alert(_("Please select at least one item to delete.")); - return; // no item selected - } getstr = items.join("&"); item_msg = item_num.join(", "); var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg); + } else if (document.items.action.checked) { + alert(_("Deletion of item from a batch with only one item will delete the batch.\n\nIf this is what you want, select 'Delete batch' option from toolbar")); + return; // no deletion for single item batch } else { - alert(_("Please select at least label to delete.")); + alert(_("Please select at least one patron to delete.")); return; // no item selected } var answer = confirm(msg); --