Revert "Moved javascript from twig to js file"

This reverts commit 29c18b921c9222ac1c372972eab644aee9f32333.