Permalink
Browse files

Merge branch 'MDL-47899-master' of https://github.com/lucaboesch/moodle

  • Loading branch information...
dmonllao committed Jul 11, 2018
2 parents fd2b5d5 + aab977e commit c2164bff0dcba3fa1535fbb14f9ffc7511c5e89d
@@ -435,6 +435,9 @@ function course_search_form($value = '', $format = 'plain') {
$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 @@ public function search_courses($searchcriteria) {
// 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;
@@ -383,6 +383,13 @@
$string['coursesettings'] = 'Course default settings';
$string['coursesmovedout'] = 'Courses moved out from {$a}';
$string['coursespending'] = 'Courses pending approval';
$string['coursesearch'] = 'Search courses';
$string['coursesearch_help'] = '<p>You can search for multiple words at once and can refine your search as follows:</p>
<ul>
<li>word - find any match of this word within the text.</li>
<li>+word - only exact matching words will be found.</li>
<li>-word - don\'t include results containing this word.</li>
</ul>';
$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['searchbyemail'] = 'Search by email address';
$string['searchbyusername'] = 'Search by username';
$string['searchcourses'] = 'Search courses';
$string['searchhelp'] = '<p>You can search for multiple words at once and can refine your search as follows:</p>
<ul>
<li>word - find any match of this word within the text.</li>
<li>+word - only exact matching words will be found.</li>
<li>-word - don\'t include results containing this word.</li>
</ul>';
$string['searchoptions'] = 'Search options';
$string['searchresults'] = 'Search results';
$string['sec'] = 'sec';
@@ -74,6 +74,10 @@ public function course_search_form($value = '', $format = 'plain') {
'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);
}
@@ -19,5 +19,8 @@
<label for="{{inputid}}">{{#str}}searchcourses{{/str}}</label>
<input id="{{inputid}}" name="search" type="text" size="{{inputsize}}" value="{{value}}" class="form-control">
<button class="btn btn-secondary" type="submit">{{#str}}go{{/str}}</button>
{{#helpicon}}
{{>core/help_icon}}
{{/helpicon}}
</fieldset>
</form>

0 comments on commit c2164bf

Please sign in to comment.