Adding templates to the modal dialog.