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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batch_delete_records.tt (-15 / +2 lines)
Lines 61-81 $(document).ready(function() { Link Here
61
    "bPaginate": false
61
    "bPaginate": false
62
  }));
62
  }));
63
63
64
  function Checkbox(){
65
    var form = document.getElementById('selectrecords');
66
    var inputs = form.getElementsByTagName('input');
67
    var checked = false;
68
    for (var i=0; i<inputs.length; i++) {
69
      if (inputs[i].type == 'checkbox' && inputs[i].name == 'record_id') {
70
        checked = inputs[i].checked;
71
        if (checked) return true;
72
      }
73
    }
74
    return false;
75
  }
76
77
  $("#selectrecords").on("submit",function(){
64
  $("#selectrecords").on("submit",function(){
78
    if (Checkbox() == false){
65
    var nb_checked = $("#selectrecords").find("input[type='checkbox'][name='record_id']:checked").size();
66
    if (nb_checked == 0){
79
      alert(_("No records have been selected."));
67
      alert(_("No records have been selected."));
80
      return false;
68
      return false;
81
    }
69
    }
82
- 

Return to bug 16949