- Dynamically build the list of grades for tours based on the configured fair

grades.
This commit is contained in:
dave 2007-01-21 18:46:12 +00:00
parent ca24d7afc3
commit 5d36be70e2

View File

@ -43,18 +43,12 @@ function tableEditorSetup($editor)
// print_r($e);
print("<br>\n");
/* Build an array of langauges that we support */
$gradechoices=array(
array('key' => 4, 'val' => "Grade 4"),
array('key' => 5, 'val' => "Grade 5"),
array('key' => 6, 'val' => "Grade 6"),
array('key' => 7, 'val' => "Grade 7"),
array('key' => 8, 'val' => "Grade 8"),
array('key' => 9, 'val' => "Grade 9"),
array('key' => 10, 'val' => "Grade 10"),
array('key' => 11, 'val' => "Grade 11"),
array('key' => 12, 'val' => "Grade 12") );
/* Build an array of grades */
$gradechoices = array();
for($g = $config['mingrade']; $g <= $config['maxgrade']; $g++) {
$gradechoices[] = array('key' => $g, 'val' => "Grade $g");
}
$editor->setFieldOptions("grade_min", $gradechoices);
$editor->setFieldInputType("grade_min", 'select');