refactor the form submission confirm function to jobs.js