Simplify function to change the status of the button.