add check cancel button function on pulgin page