Add cancel button to json code dialog