LPS-30949 Extracting confirmation dialog to function and using it to get user choices in edit window