Added handler for the "commit button".