Moved js html to template and added form