edit templates in modal dialogue