using templates, edit/delete through modal window not functioning