} $header .= '<TD valign=bottom colspan=' . $colspan . '>' . TextInput($RET['DEFAULT_SELECTION'], 'tables[' . $_REQUEST['id'] . '][DEFAULT_SELECTION]', _('Default')) . '<small><BR>' . _('* for dates: YYYY-MM-DD') . ',<BR> ' . _('for checkboxes: Y') . '</small></TD>'; $new = $_REQUEST['id'] == 'new'; $header .= '<TD>' . CheckboxInput($RET['REQUIRED'], 'tables[' . $_REQUEST['id'] . '][REQUIRED]', _('Required'), '', $new) . '</TD>'; $header .= '</TR>'; $header .= '</TABLE>'; } elseif ($_REQUEST['category_id']) { echo "<FORM action=Modules.php?modname={$_REQUEST['modname']}&table=ADDRESS_FIELD_CATEGORIES"; if ($_REQUEST['category_id'] != 'new') { echo "&category_id={$_REQUEST['category_id']}"; } echo " method=POST>"; DrawHeader($title, $delete_button . SubmitButton(_('Save'))); $header .= '<TABLE cellpadding=3 width=100%>'; $header .= '<TR>'; $header .= '<TD>' . MLTextInput($RET['TITLE'], 'tables[' . $_REQUEST['category_id'] . '][TITLE]', _('Title')) . '</TD>'; $header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', _('Sort Order'), 'size=5') . '</TD>'; if ($_REQUEST['category_id'] == 'new') { $new = true; } $header .= '<TD><TABLE><TR>'; $header .= '<TD>' . CheckboxInput($RET['RESIDENCE'], 'tables[' . $_REQUEST['category_id'] . '][RESIDENCE]', _('Residence'), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD>'; $header .= '<TD>' . CheckboxInput($RET['MAILING'], 'tables[' . $_REQUEST['category_id'] . '][MAILING]', _('Mailing'), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD>'; $header .= '<TD>' . CheckboxInput($RET['BUS'], 'tables[' . $_REQUEST['category_id'] . '][BUS]', _('Bus'), '', $new, '<IMG SRC=assets/check.gif height=15 vspace=0 hspace=0 border=0>', '<IMG SRC=assets/x.gif height=15 vspace=0 hspace=0 border=0>') . '</TD>'; $header .= '</TR><TR>'; $header .= '<TD colspan=3><small><FONT color=' . Preferences('TITLES') . '>' . _('Note: All unchecked means applies to all addresses') . '</FONT></small></TD>'; $header .= '</TR></TABLE></TD>'; $header .= '</TR>'; $header .= '</TABLE>'; } else { $header = false;
$header .= '<TD style="vertical-align:bottom;" colspan="' . $colspan . '">' . TextInput($RET['DEFAULT_SELECTION'], 'tables[' . $_REQUEST['id'] . '][DEFAULT_SELECTION]', _('Default')) . '<BR />' . _('* for dates: YYYY-MM-DD') . ',<BR /> ' . _('for checkboxes: Y') . '</TD>'; $new = $_REQUEST['id'] == 'new'; $header .= '<TD>' . CheckboxInput($RET['REQUIRED'], 'tables[' . $_REQUEST['id'] . '][REQUIRED]', _('Required'), '', $new) . '</TD>'; $header .= '</TR>'; $header .= '</TABLE>'; } elseif ($_REQUEST['category_id']) { echo '<FORM action="Modules.php?modname=' . $_REQUEST['modname'] . '&table=STUDENT_FIELD_CATEGORIES'; if ($_REQUEST['category_id'] != 'new') { echo '&category_id=' . $_REQUEST['category_id']; } echo '" method="POST">'; DrawHeader($title, $delete_button . SubmitButton(_('Save'))); $header .= '<TABLE class="width-100p cellpadding-3">'; $header .= '<TR>'; //modif Francois: title required $header .= '<TD>' . MLTextInput($RET['TITLE'], 'tables[' . $_REQUEST['category_id'] . '][TITLE]', (!$RET['TITLE'] ? '<span style="color:red">' : '') . _('Title') . (!$RET['TITLE'] ? '</span>' : ''), 'required') . '</TD>'; $header .= '<TD>' . TextInput($RET['SORT_ORDER'], 'tables[' . $_REQUEST['category_id'] . '][SORT_ORDER]', _('Sort Order'), 'size=5') . '</TD>'; $header .= '<TD>' . TextInput($RET['COLUMNS'], 'tables[' . $_REQUEST['category_id'] . '][COLUMNS]', _('Display Columns'), 'size=5') . '</TD>'; $new = $_REQUEST['category_id'] == 'new'; if ($_REQUEST['category_id'] > 4 || $new) { $header .= '<TD>' . TextInput($RET['INCLUDE'], 'tables[' . $_REQUEST['category_id'] . '][INCLUDE]', _('Include (should be left blank for most categories)')) . '</TD>'; } $header .= '</TR>'; $header .= '</TABLE>'; } else { $header = false; } if ($header) { DrawHeader($header); echo '</FORM>'; }
if (empty($_REQUEST['modfunc'])) { if (!empty($note)) { echo ErrorMessage($note, 'note'); } if (!empty($error)) { echo ErrorMessage($error, 'error'); } echo '<FORM ACTION="Modules.php?modname=' . $_REQUEST['modname'] . '&modfunc=update" METHOD="POST">'; if (AllowEdit()) { DrawHeader('', SubmitButton(_('Save'))); } echo '<BR />'; PopTable('header', SchoolInfo('TITLE')); $program_config = DBGet(DBQuery("SELECT * FROM PROGRAM_CONFIG WHERE SCHOOL_ID='" . UserSchool() . "' AND SYEAR='" . UserSyear() . "'"), array(), array('TITLE')); echo '<FIELDSET><legend><b>' . ParseMLField(Config('TITLE')) . '</b></legend><TABLE>'; echo '<TR style="text-align:left;"><TD>' . MLTextInput(Config('TITLE'), 'values[CONFIG][TITLE]', _('Program Title'), 'required') . '</TD></TR>'; echo '</TABLE></FIELDSET>'; echo '<BR /><FIELDSET><legend><b>' . _('School') . '</b></legend><TABLE>'; //modif Francois: school year over one/two calendar years format echo '<TR style="text-align:left;"><TD>' . CheckboxInput(Config('SCHOOL_SYEAR_OVER_2_YEARS'), 'values[CONFIG][SCHOOL_SYEAR_OVER_2_YEARS]', _('School year over two calendar years'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>'; echo '</TABLE></FIELDSET>'; echo '<BR /><FIELDSET><legend><b>' . _('Students') . '</b></legend><TABLE>'; echo '<TR style="text-align:left;"><TD>' . CheckboxInput(Config('STUDENTS_USE_MAILING'), 'values[CONFIG][STUDENTS_USE_MAILING]', _('Display Mailing Address'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>'; echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['STUDENTS_USE_BUS'][1]['VALUE'], 'values[PROGRAM_CONFIG][STUDENTS_USE_BUS]', _('Check Bus Pickup / Dropoff by default'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>'; echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['STUDENTS_USE_CONTACT'][1]['VALUE'], 'values[PROGRAM_CONFIG][STUDENTS_USE_CONTACT]', _('Enable Legacy Contact Information'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>'; echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['STUDENTS_SEMESTER_COMMENTS'][1]['VALUE'], 'values[PROGRAM_CONFIG][STUDENTS_SEMESTER_COMMENTS]', _('Use Semester Comments instead of Quarter Comments'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>'; echo '</TABLE></FIELDSET>'; echo '<BR /><FIELDSET><legend><b>' . _('Grades') . '</b></legend><TABLE>'; $options = array('-1' => _('Use letter grades only'), '0' => _('Use letter and percent grades'), '1' => _('Use percent grades only')); echo '<TR style="text-align:left;"><TD>' . SelectInput($program_config['GRADES_DOES_LETTER_PERCENT'][1]['VALUE'], 'values[PROGRAM_CONFIG][GRADES_DOES_LETTER_PERCENT]', _('Grades'), $options, false) . '</TD></TR>'; echo '<TR style="text-align:left;"><TD>' . CheckboxInput($program_config['GRADES_HIDE_NON_ATTENDANCE_COMMENT'][1]['VALUE'], 'values[PROGRAM_CONFIG][GRADES_HIDE_NON_ATTENDANCE_COMMENT]', _('Hide grade comment except for attendance period courses'), '', false, '<img src="assets/check.png" height="15" /> ', '<img src="assets/x.png" height="15" /> ') . '</TD></TR>';