MDL-69454 core_search: consistent mod searches
[moodle.git] / mod / forum / classes / output / quick_search_form.php
index dc024b5..80f55d4 100644 (file)
@@ -63,11 +63,16 @@ class quick_search_form implements renderable, templatable {
     }
 
     public function export_for_template(renderer_base $output) {
+        $hiddenfields = [
+            (object) ['name' => 'id', 'value' => $this->courseid],
+        ];
         $data = [
-            'actionurl' => $this->actionurl->out(false),
-            'courseid' => $this->courseid,
+            'action' => $this->actionurl->out(false),
+            'hiddenfields' => $hiddenfields,
             'query' => $this->query,
             'helpicon' => $this->helpicon->export_for_template($output),
+            'inputname' => 'search',
+            'searchstring' => get_string('searchforums', 'mod_forum')
         ];
         return $data;
     }