From 5792c96eaa69b8e43b28a5c873a3d1d907ebc384 Mon Sep 17 00:00:00 2001 From: msquare Date: Wed, 27 Dec 2017 14:51:08 +0100 Subject: fix own button --- public/js/forms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'public') diff --git a/public/js/forms.js b/public/js/forms.js index 1efd80bb..5aa4f25a 100644 --- a/public/js/forms.js +++ b/public/js/forms.js @@ -17,8 +17,8 @@ function checkAll(id, checked) { * @param {list} shifts_list A list of numbers */ function checkOwnTypes(id, shifts_list) { - $('#' + id + ' input[type=checkbox]').each(function () { - this.checked = $.inArray(parseInt(this.value), shifts_list); + $("#" + id + " input[type='checkbox']").each(function () { + this.checked = $.inArray(parseInt(this.value), shifts_list) != -1; }); } -- cgit v1.2.3-70-g09d2