From 2134ddcba1b8983f173f9cb4b162f705cbbe9b1b Mon Sep 17 00:00:00 2001 From: Rossiani Wijaya Date: Fri, 3 Aug 2012 13:39:36 +0800 Subject: [PATCH] MDL-34575 accessibility compliance for notes: Add form input text and select tag --- lang/en/notes.php | 1 + user/addnote.php | 5 ++--- user/groupaddnote.php | 2 +- user/index.php | 3 ++- user/message.html | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lang/en/notes.php b/lang/en/notes.php index bffe068c6ea..78686fe7bb8 100644 --- a/lang/en/notes.php +++ b/lang/en/notes.php @@ -59,4 +59,5 @@ $string['publishstate_help'] = 'A note\'s context determines who can see the not * Site - The note will be visible to teachers in all courses'; $string['site'] = 'site'; $string['sitenotes'] = 'Site notes'; +$string['selectnotestate'] = "Select note state"; $string['unknown'] = 'unknown'; diff --git a/user/addnote.php b/user/addnote.php index e64957b4ecc..a3753876822 100644 --- a/user/addnote.php +++ b/user/addnote.php @@ -79,7 +79,6 @@ $PAGE->set_title("$course->shortname: ".get_string('extendenrol')); $PAGE->set_heading($course->fullname); echo $OUTPUT->header(); - // this will contain all available the based On select options, but we'll disable some on them on a per user basis echo $OUTPUT->heading($straddnote); @@ -104,12 +103,12 @@ if (empty($users) and $post = data_submitted()) { } } } - foreach ($users as $k => $v) { if(!$user = $DB->get_record('user', array('id'=>$v))) { continue; } - $checkbox = html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false); + $checkbox = html_writer::label(get_string('selectnotestate', 'note'), 'menustates', false, array('class' => 'accesshide')); + $checkbox .= html_writer::select($state_names, 'states[' . $k . ']', empty($states[$k]) ? NOTES_STATE_PUBLIC : $states[$k], false, array('id' => 'menustates')); $table->data[] = array( ''. fullname($user, true), '', diff --git a/user/groupaddnote.php b/user/groupaddnote.php index 67dc9b39c2c..ae2404b2f97 100644 --- a/user/groupaddnote.php +++ b/user/groupaddnote.php @@ -117,7 +117,7 @@ echo '

' . get_string('content', 'notes'); echo '

'; echo '

'; -echo get_string('publishstate', 'notes'); +echo html_writer::label(get_string('publishstate', 'notes'), 'menustate'); echo $OUTPUT->help_icon('publishstate', 'notes'); echo html_writer::select($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false); echo '

'; diff --git a/user/index.php b/user/index.php index e850bdc9a90..89e0c03901b 100644 --- a/user/index.php +++ b/user/index.php @@ -804,7 +804,8 @@ if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) { echo '
'.get_string('search').': '."\n"; - echo ' 
'."\n"; + echo ''; + echo ' '."\n"; } $perpageurl = clone($baseurl); diff --git a/user/message.html b/user/message.html index e077cf14b69..6426111f060 100644 --- a/user/message.html +++ b/user/message.html @@ -14,7 +14,7 @@ - : +