moodle/calendar/preferences.html
2009-11-19 19:28:19 +00:00

92 lines
2.9 KiB
HTML

<form method="post" action="preferences.php" id="prefform">
<table class="formtable">
<tr>
<th style="width: 30%;" scope="row"><?php print_string('pref_timeformat', 'calendar')?>:</th>
<td>
<?php
$options = array();
$options['0'] = get_string('default', 'calendar');
$options[CALENDAR_TF_12] = get_string('timeformat_12', 'calendar');
$options[CALENDAR_TF_24] = get_string('timeformat_24', 'calendar');
$select = html_select::make($options, "timeformat", $prefs->timeformat, false);
$select->nothingvalue = '';
echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_timeformat', 'calendar'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><?php print_string('pref_startwday', 'calendar')?>:</th>
<td>
<?php
$options = array();
$options[0] = get_string('sunday', 'calendar');
$options[1] = get_string('monday', 'calendar');
$options[2] = get_string('tuesday', 'calendar');
$options[3] = get_string('wednesday', 'calendar');
$options[4] = get_string('thursday', 'calendar');
$options[5] = get_string('friday', 'calendar');
$options[6] = get_string('saturday', 'calendar');
$select = html_select::make($options, 'startwday', $prefs->startwday, false);
$select->nothingvalue = '';
echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_startwday', 'calendar'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><?php print_string('pref_maxevents', 'calendar')?>:</th>
<td>
<?php
$options = NULL;
for ($i=1; $i<=20; $i++) {
$options[$i] = $i;
}
$select = html_select::make($options, "maxevents", $prefs->maxevents, false);
$select->nothingvalue = '';
echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_maxevents', 'calendar'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><?php print_string('pref_lookahead', 'calendar')?>:</th>
<td>
<?php
$options = NULL;
for ($i=1; $i<=200; $i++) {
$options[$i] = $i;
}
$select = html_select::make($options, "lookahead", $prefs->lookahead, false);
$select->nothingvalue = '';
echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_lookahead', 'calendar'); ?></p>
</td>
</tr>
<tr>
<th scope="row"><?php print_string('pref_persistflt', 'calendar')?>:</th>
<td>
<?php
$select = html_select::make(array(0 => get_string('no'), 1 => get_string('yes')), 'persistflt', $prefs->persistflt, false);
$select->nothingvalue = '';
echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_persistflt', 'calendar'); ?></p>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<input type="hidden" name="sesskey" value="<?php echo sesskey(); ?>" />
<input type="submit" value="<?php print_string("savechanges") ?>" /></td>
</tr>
</table>
</form>