MDL-48423 messages: improved accessibility of contacts list

This commit is contained in:
Brian Barnes
2014-12-22 14:16:44 +00:00
committed by Dan Poltawski
parent 9549cd267e
commit 83906584e2
+6 -9
View File
@@ -493,6 +493,7 @@ function message_print_contacts($onlinecontacts, $offlinecontacts, $strangers, $
* @return void
*/
function message_print_usergroup_selector($viewing, $courses, $coursecontexts, $countunreadtotal, $countblocked, $strunreadmessages, $user1 = null) {
global $PAGE;
$options = array();
if ($countunreadtotal>0) { //if there are unread messages
@@ -530,15 +531,11 @@ function message_print_usergroup_selector($viewing, $courses, $coursecontexts, $
$options[MESSAGE_VIEW_BLOCKED] = $str;
}
echo html_writer::start_tag('form', array('id' => 'usergroupform','method' => 'get','action' => ''));
echo html_writer::start_tag('fieldset');
if ( !empty($user1) && !empty($user1->id) ) {
echo html_writer::empty_tag('input', array('type' => 'hidden','name' => 'user1','value' => $user1->id));
}
echo html_writer::label(get_string('messagenavigation', 'message'), 'viewing');
echo html_writer::select($options, 'viewing', $viewing, false, array('id' => 'viewing','onchange' => 'this.form.submit()'));
echo html_writer::end_tag('fieldset');
echo html_writer::end_tag('form');
$select = new single_select($PAGE->url, 'viewing', $options, $viewing, false);
$select->set_label(get_string('messagenavigation', 'message'));
$renderer = $PAGE->get_renderer('core');
echo $renderer->render($select);
}
/**