Refactored setting disableControls boolean to avoid using .attr()