Skip to content

Commit

Permalink
Merge branch 'MDL-34565_accessibility_m22' of git://github.com/rwijay…
Browse files Browse the repository at this point in the history
…a/moodle into MOODLE_22_STABLE
  • Loading branch information
Aparup Banerjee committed Aug 14, 2012
2 parents 8f4ff87 + 92af44e commit 97da1cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions mod/forum/lib.php
Expand Up @@ -3802,9 +3802,11 @@ function forum_print_mode_form($id, $mode, $forumtype='') {
global $OUTPUT;
if ($forumtype == 'single') {
$select = new single_select(new moodle_url("/mod/forum/view.php", array('f'=>$id)), 'mode', forum_get_layout_modes(), $mode, null, "mode");
$select->set_label(get_string('displaymode', 'forum'), array('class' => 'accesshide'));
$select->class = "forummode";
} else {
$select = new single_select(new moodle_url("/mod/forum/discuss.php", array('d'=>$id)), 'mode', forum_get_layout_modes(), $mode, null, "mode");
$select->set_label(get_string('displaymode', 'forum'), array('class' => 'accesshide'));
}
echo $OUTPUT->render($select);
}
Expand Down
14 changes: 12 additions & 2 deletions mod/forum/search.php
Expand Up @@ -343,10 +343,15 @@ function forum_print_big_search_form($course) {
}

echo '<input name="timefromrestrict" type="checkbox" value="1" alt="'.get_string('searchdatefrom', 'forum').'" onclick="return lockoptions(\'searchform\', \'timefromrestrict\', timefromitems)" '. $datefromchecked . ' /> ';
$selectors = html_writer::select_time('days', 'fromday', $datefrom)
$selectors = html_writer::label(get_string('days'), 'menufromday', false, array('class' => 'accesshide'))
. html_writer::select_time('days', 'fromday', $datefrom)
. html_writer::label(get_string('months'), 'menufrommonth', false, array('class' => 'accesshide'))
. html_writer::select_time('months', 'frommonth', $datefrom)
. html_writer::label(get_string('years'), 'menufromyear', false, array('class' => 'accesshide'))
. html_writer::select_time('years', 'fromyear', $datefrom)
. html_writer::label(get_string('hours'), 'menufromhour', false, array('class' => 'accesshide'))
. html_writer::select_time('hours', 'fromhour', $datefrom)
. html_writer::label(get_string('minutes'), 'menufromminute', false, array('class' => 'accesshide'))
. html_writer::select_time('minutes', 'fromminute', $datefrom);
echo $selectors;
echo '<input type="hidden" name="hfromday" value="0" />';
Expand All @@ -369,10 +374,15 @@ function forum_print_big_search_form($course) {
}

echo '<input name="timetorestrict" type="checkbox" value="1" alt="'.get_string('searchdateto', 'forum').'" onclick="return lockoptions(\'searchform\', \'timetorestrict\', timetoitems)" ' .$datetochecked. ' /> ';
$selectors = html_writer::select_time('days', 'today', $dateto)
$selectors = html_writer::label(get_string('days'), 'menutoday', false, array('class' => 'accesshide'))
. html_writer::select_time('days', 'today', $dateto)
. html_writer::label(get_string('months'), 'menutomonth', false, array('class' => 'accesshide'))
. html_writer::select_time('months', 'tomonth', $dateto)
. html_writer::label(get_string('years'), 'menutoyear', false, array('class' => 'accesshide'))
. html_writer::select_time('years', 'toyear', $dateto)
. html_writer::label(get_string('hours'), 'menutohour', false, array('class' => 'accesshide'))
. html_writer::select_time('hours', 'tohour', $dateto)
. html_writer::label(get_string('minutes'), 'menutominute', false, array('class' => 'accesshide'))
. html_writer::select_time('minutes', 'tominute', $dateto);
echo $selectors;

Expand Down

0 comments on commit 97da1cf

Please sign in to comment.