move modals into template