Skip to content

Commit

Permalink
MDL-34575 accessibility compliance for notes: Add form input text and…
Browse files Browse the repository at this point in the history
… select tag
  • Loading branch information
Rossiani Wijaya committed Aug 3, 2012
1 parent 02814bf commit 1445fd1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions lang/en/notes.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@
* Site - The note will be visible to teachers in all courses'; * Site - The note will be visible to teachers in all courses';
$string['site'] = 'site'; $string['site'] = 'site';
$string['sitenotes'] = 'Site notes'; $string['sitenotes'] = 'Site notes';
$string['selectnotestate'] = "Select note state";
$string['unknown'] = 'unknown'; $string['unknown'] = 'unknown';
5 changes: 2 additions & 3 deletions user/addnote.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
$PAGE->set_heading($course->fullname); $PAGE->set_heading($course->fullname);


echo $OUTPUT->header(); 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 // 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); echo $OUTPUT->heading($straddnote);
Expand All @@ -104,12 +103,12 @@
} }
} }
} }

foreach ($users as $k => $v) { foreach ($users as $k => $v) {
if(!$user = $DB->get_record('user', array('id'=>$v))) { if(!$user = $DB->get_record('user', array('id'=>$v))) {
continue; 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( $table->data[] = array(
'<input type="hidden" name="userid['.$k.']" value="'.$v.'" />'. fullname($user, true), '<input type="hidden" name="userid['.$k.']" value="'.$v.'" />'. fullname($user, true),
'<textarea name="contents['. $k . ']" rows="2" cols="40">' . strip_tags(@$contents[$k]) . '</textarea>', '<textarea name="contents['. $k . ']" rows="2" cols="40">' . strip_tags(@$contents[$k]) . '</textarea>',
Expand Down
2 changes: 1 addition & 1 deletion user/groupaddnote.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>'; echo '<br /><textarea name="content" rows="5" cols="50">' . strip_tags(@$content) . '</textarea></p>';


echo '<p>'; echo '<p>';
echo get_string('publishstate', 'notes'); echo html_writer::label(get_string('publishstate', 'notes'), 'menustate');
echo $OUTPUT->help_icon('publishstate', 'notes'); echo $OUTPUT->help_icon('publishstate', 'notes');
echo html_writer::select($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false); echo html_writer::select($state_names, 'state', empty($state) ? NOTES_STATE_PUBLIC : $state, false);
echo '</p>'; echo '</p>';
Expand Down
3 changes: 2 additions & 1 deletion user/index.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -813,7 +813,8 @@


if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) { if (has_capability('moodle/site:viewparticipants', $context) && $totalcount > ($perpage*3)) {
echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n"; echo '<form action="index.php" class="searchform"><div><input type="hidden" name="id" value="'.$course->id.'" />'.get_string('search').':&nbsp;'."\n";
echo '<input type="text" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n"; echo '<label class="accesshide" for="search">' . get_string('search', 'search') . '</label>';
echo '<input type="text" id="search" name="search" value="'.s($search).'" />&nbsp;<input type="submit" value="'.get_string('search').'" /></div></form>'."\n";
} }


$perpageurl = clone($baseurl); $perpageurl = clone($baseurl);
Expand Down
2 changes: 1 addition & 1 deletion user/message.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</tr> </tr>


<tr valign="top"> <tr valign="top">
<td align="right"><b><?php print_string("formattexttype"); ?>:</b></td> <td align="right"><label for="menuformat"><b><?php print_string("formattexttype"); ?>:</b></label></td>
<td> <td>
<?php <?php
if ($usehtmleditor) { /// Trying this out for a while if ($usehtmleditor) { /// Trying this out for a while
Expand Down

0 comments on commit 1445fd1

Please sign in to comment.