Edit dialog control function