{"size": 951, "ext": "js", "max_stars_repo_path": "tpmanager/html/scripts/add_test.js", "max_stars_repo_name": "bobbrady/tpteam", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "tpmanager/html/scripts/add_test.js", "max_issues_repo_name": "bobbrady/tpteam", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "tpmanager/html/scripts/add_test.js", "max_forks_repo_name": "bobbrady/tpteam", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.7027027027, "max_line_length": 71, "alphanum_fraction": 0.5488958991}
/********************************************************************
 * 
 * File		:	add_test.js
 *
 * Author	:	Bob Brady, rpbrady@gmail.com
 * 
 * Contents	:	A form validation script used when adding tests,
 *              to verify core test data
 *  
 ********************************************************************/
function validatePage1Form ()
{ 
	var name = document.addTestPage1.testName.value;
	var desc = document.addTestPage1.testDesc.value;
	var proj = document.addTestPage1.proj;
	var testType = document.addTestPage1.testType;
				
	if( name == "")
	{ 
		alert("Please enter a test name.");
		return false;
	} 
	else if(proj.selectedIndex == 0)
	{ 
		alert("Please select a project.");
		return false;
	}
	else if(testType.selectedIndex == 0)
	{ 
		alert("Please select a testType.");
		return false;
	}
	document.addTestPage1.action = "addTest";
	document.addTestPage1.submit();
	return true;
}
