create a modal dialog with a custom dialog template