core-4736 refactor code to prevent repeat confirmation for save