ECMS-4961 fix js error in toggleCheckboxes function