Move js template into it's own file, include in in admin_footer.