}
function calendar_print_month_selector($name, $selected) {
-
+ global $OUTPUT;
$months = array();
for ($i=1; $i<=12; $i++) {
$months[$i] = userdate(gmmktime(12, 0, 0, $i, 15, 2000), '%B');
}
- choose_from_menu($months, $name, $selected, '');
+ echo $OUTPUT->select(html_select::make($months, $name, $selected, false));
}
function calendar_get_filters_status() {
$options['0'] = get_string('default', 'calendar');
$options[CALENDAR_TF_12] = get_string('timeformat_12', 'calendar');
$options[CALENDAR_TF_24] = get_string('timeformat_24', 'calendar');
- choose_from_menu ($options, "timeformat", $prefs->timeformat, "", "", "");
+ $select = html_select::make($options, "timeformat", $prefs->timeformat, false);
+ $select->nothingvalue = '';
+ echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_timeformat', 'calendar'); ?></p>
</td>
$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, '', '', '');
+ $select = html_select::make($options, 'startwday', $prefs->startwday, false);
+ $select->nothingvalue = '';
+ echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_startwday', 'calendar'); ?></p>
</td>
for ($i=1; $i<=20; $i++) {
$options[$i] = $i;
}
- choose_from_menu ($options, "maxevents", $prefs->maxevents, "", "", "");
+ $select = html_select::make($options, "maxevents", $prefs->maxevents, false);
+ $select->nothingvalue = '';
+ echo $OUTPUT->select($select);
?>
<p><?php print_string('explain_maxevents', 'calendar'); ?></p>
</td>
for ($i=1; $i<=200; $i++) {
$options[$i] = $i;
}
- choose_from_menu ($options, "lookahead", $prefs->lookahead, "", "", "");
+ $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>
<th scope="row"><?php print_string('pref_persistflt', 'calendar')?>:</th>
<td>
- <?php choose_from_menu (array(0 => get_string('no'), 1 => get_string('yes')), 'persistflt', $prefs->persistflt, '', '', ''); ?>
+ <?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>