Move the Project Preferences Dialog variables to the template

This removes the jQuery dialog populate part of the Project Preferences Dialog, and moves it all to the template, passing the required variables.