Move collection form js into a widget