<commit_before>const keystone		= require( 'keystone' );
const async			= require( 'async' );
const listsService	= require( '../middleware/service_lists' );
const pageService	= require( '../middleware/service_page' );

exports = module.exports = ( req, res ) => {
	'use strict';

	const view 				= new keystone.View( req, res );

	const locals 			= res.locals;
	// objects with additional search parameters
	const raceOptions		= { other: true };
	const waysToHearOptions	= { other: true };
	// TODO: check all these list service fetches to see which are neede for this form
	async.parallel([
		done => { listsService.getAllStates( req, res, done ) },
		done => { listsService.getAllRaces( req, res, done, raceOptions ) },
		done => { listsService.getAllGenders( req, res, done ) },
		done => { listsService.getAllWaysToHearAboutMARE( req, res, done, waysToHearOptions ) },
		done => { pageService.populateSidebar( req, res, done ); }
	], () => {
		// Set the layout to render with the right sidebar
		locals[ 'render-with-sidebar' ] = true;
		// Render the view once all the data has been retrieved
		view.render( 'form_information-request.hbs' );
		
	}, err => {

		console.log( err );
	});
};<commit_msg>#92 | add default state of MA to information request form<commit_after>const keystone		= require( 'keystone' );
const async			= require( 'async' );
const listsService	= require( '../middleware/service_lists' );
const pageService	= require( '../middleware/service_page' );

exports = module.exports = ( req, res ) => {
	'use strict';

	const view 				= new keystone.View( req, res );

	const locals 			= res.locals;
	// objects with additional search parameters
	const stateOptions		= { default: 'Massachusetts' };
	const raceOptions		= { other: true };
	const waysToHearOptions	= { other: true };
	// TODO: check all these list service fetches to see which are neede for this form
	async.parallel([
		done => { listsService.getAllStates( req, res, done, stateOptions ) },
		done => { listsService.getAllRaces( req, res, done, raceOptions ) },
		done => { listsService.getAllGenders( req, res, done ) },
		done => { listsService.getAllWaysToHearAboutMARE( req, res, done, waysToHearOptions ) },
		done => { pageService.populateSidebar( req, res, done ); }
	], () => {
		// Set the layout to render with the right sidebar
		locals[ 'render-with-sidebar' ] = true;
		// Render the view once all the data has been retrieved
		view.render( 'form_information-request.hbs' );
		
	}, err => {

		console.log( err );
	});
};
{'fraction_non_alphanumeric': 0.13656212782850338, 'fraction_numerical': 0.0007939658594680428, 'mean_word_length': 3.781783681214421, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4612473', 'n_tokens_mistral': 840, 'n_tokens_neox': 792, 'n_words': 242}