Fixed bug in JavaScript. Incorrect checkbox value (always "on" despite the state of the checkbox) was sent in AJAX request.