importing latest templates.js client-side
closes #1975