mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-60880-master' of https://github.com/sammarshallou/moodle
This commit is contained in:
commit
97812f14c1
14 changed files with 330 additions and 32 deletions
|
@ -78,6 +78,12 @@ class block_globalsearch extends block_base {
|
|||
'type' => 'text', 'size' => '15');
|
||||
$this->content->text .= html_writer::empty_tag('input', $inputoptions);
|
||||
|
||||
// Context id.
|
||||
if ($this->page->context && $this->page->context->contextlevel !== CONTEXT_SYSTEM) {
|
||||
$this->content->text .= html_writer::empty_tag('input', ['type' => 'hidden',
|
||||
'name' => 'context', 'value' => $this->page->context->id]);
|
||||
}
|
||||
|
||||
// Search button.
|
||||
$this->content->text .= html_writer::tag('button', get_string('search', 'search'),
|
||||
array('id' => 'searchform_button', 'type' => 'submit', 'title' => 'globalsearch', 'class' => 'btn btn-secondary'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue