Ensure modals are hidden when clicking a data confirm button