Commit 70ad5136 authored by Rossiani Wijaya's avatar Rossiani Wijaya Committed by Aparup Banerjee
Browse files

MDL-34556 accessibility compliance for course: Add forform input text and select tag

parent 5c576552
......@@ -422,6 +422,7 @@ if (!$courses) {
make_categories_list($movetocategories, $notused, 'moodle/category:manage');
$movetocategories[$category->id] = get_string('moveselectedcoursesto');
echo '<tr><td colspan="3" align="right">';
echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
echo html_writer::select($movetocategories, 'moveto', $category->id, null, array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo '<input type="hidden" name="id" value="'.$category->id.'" />';
......
......@@ -369,6 +369,7 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $
}
$popupurl = new moodle_url("index.php?move=$category->id&sesskey=".sesskey());
$select = new single_select($popupurl, 'moveto', $tempdisplaylist, $category->parent, null, "moveform$category->id");
$select->set_label(get_string('frontpagecategorynames'), array('class' => 'accesshide'));
echo $OUTPUT->render($select);
}
echo '</td>';
......
......@@ -70,7 +70,8 @@ if ($scaleid) {
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
echo html_writer::select($scalemenu, 'unused');
echo html_writer::label(get_string('scales'), 'scaleunused'. $scaleid, false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused', '', array('' => 'choosedots'), array('id' => 'scaleunused'.$scaleid));
echo "</center>";
echo text_to_html($scale->description);
echo $OUTPUT->box_end();
......@@ -101,7 +102,8 @@ if ($scales = $DB->get_records("scale", array("courseid"=>$course->id), "name AS
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
echo html_writer::select($scalemenu, 'unused');
echo html_writer::label(get_string('scales'), 'courseunused' . $scale->id, false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused', '', array('' => 'choosedots'), array('id' => 'courseunused' . $scale->id));
echo "</center>";
echo text_to_html($scale->description);
echo $OUTPUT->box_end();
......@@ -127,7 +129,8 @@ if ($scales = $DB->get_records("scale", array("courseid"=>0), "name ASC")) {
echo $OUTPUT->box_start();
echo $OUTPUT->heading($scale->name);
echo "<center>";
echo html_writer::select($scalemenu, 'unused');
echo html_writer::label(get_string('scales'), 'sitescale' . $scale->id, false, array('class' => 'accesshide'));
echo html_writer::select($scalemenu, 'unused', '', array('' => 'choosedots'), array('id' => 'sitescale' . $scale->id));
echo "</center>";
echo text_to_html($scale->description);
echo $OUTPUT->box_end();
......
......@@ -377,6 +377,7 @@ if ($courses) {
echo "<input type=\"button\" onclick=\"checkall()\" value=\"$strselectall\" />\n";
echo "<input type=\"button\" onclick=\"checknone()\" value=\"$strdeselectall\" />\n";
// Select box should only show categories in which user has min capability to move course.
echo html_writer::label(get_string('moveselectedcoursesto'), 'movetoid', false, array('class' => 'accesshide'));
echo html_writer::select($usercatlist, 'moveto', '', array(''=>get_string('moveselectedcoursesto')), array('id'=>'movetoid'));
$PAGE->requires->js_init_call('M.util.init_select_autosubmit', array('movecourses', 'movetoid', false));
echo "</td>\n</tr>\n";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment