- 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_r($e);
print("<br>\n"); print("<br>\n");
/* Build an array of langauges that we support */
$gradechoices=array( /* Build an array of grades */
array('key' => 4, 'val' => "Grade 4"), $gradechoices = array();
array('key' => 5, 'val' => "Grade 5"), for($g = $config['mingrade']; $g <= $config['maxgrade']; $g++) {
array('key' => 6, 'val' => "Grade 6"), $gradechoices[] = array('key' => $g, 'val' => "Grade $g");
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") );
$editor->setFieldOptions("grade_min", $gradechoices); $editor->setFieldOptions("grade_min", $gradechoices);
$editor->setFieldInputType("grade_min", 'select'); $editor->setFieldInputType("grade_min", 'select');