added confirmation feature to dialog widget