From aab977e0ce12a88c758341da37c9d0ea067d98a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Mon, 2 Jul 2018 02:31:18 +0200 Subject: [PATCH] MDL-47899 forms: course search form info list bullet points alignment. AMOS BEGIN MOV [searchhelp,moodle],[coursesearch_help,moodle] AMOS END --- course/renderer.php | 4 +++- lang/en/moodle.php | 13 +++++++------ theme/boost/classes/output/core/course_renderer.php | 4 ++++ theme/boost/templates/course_search_form.mustache | 3 +++ 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/course/renderer.php b/course/renderer.php index b78acb6d38c..01677a5d78b 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -435,6 +435,9 @@ class core_course_renderer extends plugin_renderer_base { $output .= html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('go'))); $output .= html_writer::end_tag('fieldset'); + if ($format != 'navbar') { + $output .= $this->output->help_icon("coursesearch", "core"); + } $output .= html_writer::end_tag('form'); return $output; @@ -1853,7 +1856,6 @@ class core_course_renderer extends plugin_renderer_base { // just print search form $content .= $this->box_start('generalbox mdl-align'); $content .= $this->course_search_form(); - $content .= html_writer::tag('div', get_string("searchhelp"), array('class' => 'searchhelp')); $content .= $this->box_end(); } return $content; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index 88883beca17..e3521f0d887 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -383,6 +383,13 @@ $string['coursesectiontitle'] = 'Course: {$a->course}, {$a->sectionname}: {$a->s $string['coursesettings'] = 'Course default settings'; $string['coursesmovedout'] = 'Courses moved out from {$a}'; $string['coursespending'] = 'Courses pending approval'; +$string['coursesearch'] = 'Search courses'; +$string['coursesearch_help'] = '

You can search for multiple words at once and can refine your search as follows:

+'; $string['coursestart'] = 'Course start'; $string['coursesummary'] = 'Course summary'; $string['coursesummary_help'] = 'The course summary is displayed in the list of courses. A course search searches course summary text in addition to course names.'; @@ -1743,12 +1750,6 @@ $string['searchagain'] = 'Search again'; $string['searchbyemail'] = 'Search by email address'; $string['searchbyusername'] = 'Search by username'; $string['searchcourses'] = 'Search courses'; -$string['searchhelp'] = '

You can search for multiple words at once and can refine your search as follows:

-'; $string['searchoptions'] = 'Search options'; $string['searchresults'] = 'Search results'; $string['sec'] = 'sec'; diff --git a/theme/boost/classes/output/core/course_renderer.php b/theme/boost/classes/output/core/course_renderer.php index bf433b30d34..edf4e8dc105 100644 --- a/theme/boost/classes/output/core/course_renderer.php +++ b/theme/boost/classes/output/core/course_renderer.php @@ -74,6 +74,10 @@ class course_renderer extends \core_course_renderer { 'inputsize' => $inputsize, 'value' => $value ]; + if ($format != 'navbar') { + $helpicon = new \help_icon('coursesearch', 'core'); + $data->helpicon = $helpicon->export_for_template($this); + } return $this->render_from_template('theme_boost/course_search_form', $data); } diff --git a/theme/boost/templates/course_search_form.mustache b/theme/boost/templates/course_search_form.mustache index 9e08a9678d0..c2e729a4cab 100644 --- a/theme/boost/templates/course_search_form.mustache +++ b/theme/boost/templates/course_search_form.mustache @@ -19,5 +19,8 @@ + {{#helpicon}} + {{>core/help_icon}} + {{/helpicon}}