When click done or cancel button to do something