Disable and enable buttons when preconditions are or are not met.