moved token input calling code from application.js to the _form and layout