Update widget.js to new template