2004-05-01 17:32:37 +00:00
|
|
|
<form method="post" action="preferences.php" name="form">
|
|
|
|
|
|
|
|
<table cellpadding="9" cellspacing="0">
|
2004-12-15 07:14:41 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td nowrap="nowrap" align="right"><?php print_string('pref_dstpreset', 'calendar')?>:</td>
|
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
if(empty($CFG->calendar_dstforusers)) {
|
|
|
|
$presets = get_records('dst_preset');
|
|
|
|
$presetarray = array('0' => get_string('notusingdst', 'calendar'));
|
|
|
|
if(!empty($presets)) {
|
|
|
|
foreach($presets as $preset) {
|
|
|
|
$presetarray[$preset->id] = $preset->name;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
choose_from_menu ($presetarray, 'dstpreset', $prefs->dstpreset, '');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$preset = get_record('dst_preset', 'id', $CFG->calendar_dstforusers);
|
|
|
|
echo '<strong>'.$preset->name.'</strong>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
if(empty($CFG->calendar_dstforusers)) {
|
|
|
|
print_string('explain_dstpreset', 'calendar');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
print_string('explain_dstpresetforced', 'calendar');
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2004-05-01 17:32:37 +00:00
|
|
|
<tr valign="top">
|
2004-09-09 10:41:23 +00:00
|
|
|
<td nowrap="nowrap" align="right"><?php print_string('pref_timeformat', 'calendar')?>:</td>
|
2004-05-01 17:32:37 +00:00
|
|
|
<td>
|
2004-09-09 10:41:23 +00:00
|
|
|
<?php
|
2004-12-16 18:49:57 +00:00
|
|
|
$options = array();
|
2004-05-01 17:32:37 +00:00
|
|
|
$options['0'] = get_string('default', 'calendar');
|
|
|
|
$options[CALENDAR_TF_12] = get_string('timeformat_12', 'calendar');
|
|
|
|
$options[CALENDAR_TF_24] = get_string('timeformat_24', 'calendar');
|
2004-09-09 10:41:23 +00:00
|
|
|
choose_from_menu ($options, "timeformat", $prefs->timeformat, "", "", "");
|
2004-05-01 17:32:37 +00:00
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php print_string('explain_timeformat', 'calendar'); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2004-09-09 10:41:23 +00:00
|
|
|
<td nowrap="nowrap" align="right"><?php print_string('pref_startwday', 'calendar')?>:</td>
|
2004-05-01 17:32:37 +00:00
|
|
|
<td>
|
2004-09-09 10:41:23 +00:00
|
|
|
<?php
|
2004-12-16 18:49:57 +00:00
|
|
|
$options = array();
|
2004-05-01 17:32:37 +00:00
|
|
|
$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');
|
|
|
|
choose_from_menu($options, 'startwday', $prefs->startwday, '', '', '');
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php print_string('explain_startwday', 'calendar'); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2004-09-09 10:41:23 +00:00
|
|
|
<td nowrap="nowrap" align="right"><?php print_string('pref_maxevents', 'calendar')?>:</td>
|
2004-05-01 17:32:37 +00:00
|
|
|
<td>
|
2004-09-09 10:41:23 +00:00
|
|
|
<?php
|
2004-05-01 17:32:37 +00:00
|
|
|
$options = NULL;
|
|
|
|
for ($i=1; $i<=20; $i++) {
|
|
|
|
$options[$i] = $i;
|
|
|
|
}
|
2004-09-09 10:41:23 +00:00
|
|
|
choose_from_menu ($options, "maxevents", $prefs->maxevents, "", "", "");
|
2004-05-01 17:32:37 +00:00
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php print_string('explain_maxevents', 'calendar'); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2004-09-09 10:41:23 +00:00
|
|
|
<td nowrap="nowrap" align="right"><?php print_string('pref_lookahead', 'calendar')?>:</td>
|
2004-05-01 17:32:37 +00:00
|
|
|
<td>
|
2004-09-09 10:41:23 +00:00
|
|
|
<?php
|
2004-05-01 17:32:37 +00:00
|
|
|
$options = NULL;
|
|
|
|
for ($i=1; $i<=200; $i++) {
|
|
|
|
$options[$i] = $i;
|
|
|
|
}
|
2004-09-09 10:41:23 +00:00
|
|
|
choose_from_menu ($options, "lookahead", $prefs->lookahead, "", "", "");
|
2004-05-01 17:32:37 +00:00
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php print_string('explain_lookahead', 'calendar'); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2005-01-12 11:55:01 +00:00
|
|
|
<tr valign="top">
|
|
|
|
<td nowrap="nowrap" align="right"><?php print_string('pref_persistflt', 'calendar')?>:</td>
|
|
|
|
<td>
|
|
|
|
<?php choose_from_menu (array(0 => get_string('no'), 1 => get_string('yes')), 'persistflt', $prefs->persistflt, '', '', ''); ?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php print_string('explain_persistflt', 'calendar'); ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2004-05-01 17:32:37 +00:00
|
|
|
<tr>
|
|
|
|
<td colspan="3" align="center">
|
2004-09-09 10:41:23 +00:00
|
|
|
<input type="submit" value="<?php print_string("savechanges") ?>" /></td>
|
2004-05-01 17:32:37 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</form>
|