function makeStandardInput($value, $name) { global $THIS_RET; if ($THIS_RET['STANDARD_ID']) { $id = $THIS_RET['STANDARD_ID']; } else { $id = 'new'; } if ($name == 'TOPIC' || $name == 'STANDARD_DETAILS') { $extra = 'style=width:130px'; return StandardTextAreaInput($value, 'values[' . $id . '][' . $name . ']', '', $extra); } else { $extra = 'class=cell_floating '; return TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra); } }
function makeStandardInput($value, $name) { global $THIS_RET; if ($THIS_RET['STANDARD_ID']) { $id = $THIS_RET['STANDARD_ID']; } else { $id = 'new'; } if ($name == 'TOPIC' || $name == 'STANDARD_DETAILS') { $extra = 'style=width:130px'; return StandardTextAreaInput($value, 'values[' . $id . '][' . $name . ']', '', $extra); } elseif ($name == 'GRADE') { $grades_RET = DBGet(DBQuery('SELECT ID,TITLE FROM school_gradelevels WHERE SCHOOL_ID=\'' . UserSchool() . '\' ORDER BY SORT_ORDER')); if (count($grades_RET)) { foreach ($grades_RET as $grade) { $grades[$grade['ID']] = $grade['TITLE']; } } return SelectInput($value, 'values[' . $id . '][' . $name . ']', '', $grades, 'N/A'); } else { $extra = 'class=cell_floating '; return TextInput($value, 'values[' . $id . '][' . $name . ']', '', $extra); } }