Bug 20148: Prevent adding same user multiple times to an order

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2018-02-18 15:10:30 -03:00
parent 53e8b8cbe0
commit 90e0c0de5c

View file

@ -177,7 +177,7 @@ $(document).ready(function()
} else {
ids = new Array;
}
if (ids.indexOf(borrowernumber) < 0) {
if (ids.indexOf(borrowernumber.toString()) < 0) {
ids.push(borrowernumber);
$("#users_ids").val(ids.join(':'));
var li = '<li id="user_'+borrowernumber+'">'+borrowername