added a js function for toggling the disabled attribute of input elements based on a checkbox