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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt (-6 / +5 lines)
Lines 19-24 Link Here
19
            function Remove() {
19
            function Remove() {
20
                items = new Array;
20
                items = new Array;
21
                item_num = new Array;
21
                item_num = new Array;
22
22
                if(document.items.action.length > 0) {
23
                if(document.items.action.length > 0) {
23
                    for (var i=0; i < document.items.action.length; i++) {
24
                    for (var i=0; i < document.items.action.length; i++) {
24
                        if (document.items.action[i].checked) {
25
                        if (document.items.action[i].checked) {
Lines 26-41 Link Here
26
                            item_num.push(i+1);
27
                            item_num.push(i+1);
27
                        }
28
                        }
28
                    }
29
                    }
29
                    if (items.length < 1) {
30
                        alert(_("Please select at least one item to delete."));
31
                        return;     // no item selected
32
                    }
33
                    getstr = items.join("&");
30
                    getstr = items.join("&");
34
                    item_msg = item_num.join(", ");
31
                    item_msg = item_num.join(", ");
35
                    var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg);
32
                    var msg = _("Are you sure you want to remove card number(s): %s from this batch?").format(item_msg);
33
                } else if (document.items.action.checked) {
34
                    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"));
35
                    return; // no deletion for single item batch
36
                }
36
                }
37
                else {
37
                else {
38
                    alert(_("Please select at least label to delete."));
38
                    alert(_("Please select at least one patron to delete."));
39
                    return;     // no item selected
39
                    return;     // no item selected
40
                }
40
                }
41
                var answer = confirm(msg);
41
                var answer = confirm(msg);
42
- 

Return to bug 14632