Skip to content

Commit

Permalink
Merge branch 'MDL-77313' of https://github.com/paulholden/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Apr 25, 2023
2 parents b495ba0 + 1dbeca8 commit 49d013e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
8 changes: 8 additions & 0 deletions backup/util/ui/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,10 @@ public function render_restore_course_search(restore_course_search $component) {
'extraclasses' => 'rcs-search mb-3 w-25',
'inputname' => restore_course_search::$VAR_SEARCH,
'searchstring' => get_string('searchcourses'),
'buttonattributes' => [
(object) ['key' => 'name', 'value' => 'searchcourses'],
(object) ['key' => 'value', 'value' => 1],
],
'query' => $component->get_search(),
];
$output .= $this->output->render_from_template('core/search_input', $data);
Expand Down Expand Up @@ -955,6 +959,10 @@ public function render_restore_category_search(restore_category_search $componen
'extraclasses' => 'rcs-search mb-3 w-25',
'inputname' => restore_category_search::$VAR_SEARCH,
'searchstring' => get_string('searchcoursecategories'),
'buttonattributes' => [
(object) ['key' => 'name', 'value' => 'searchcourses'],
(object) ['key' => 'value', 'value' => 1],
],
'query' => $component->get_search(),
];
$output .= $this->output->render_from_template('core/search_input', $data);
Expand Down
11 changes: 10 additions & 1 deletion lib/templates/search_input.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"searchstring": "Search settings",
"value": "policy",
"btnclass": "primary",
"buttonattributes": [
{
"key": "name",
"value": "hello"
}
],
"query": "themedesigner",
"hiddenfields": [
{
Expand Down Expand Up @@ -59,7 +65,10 @@
value="{{ query }}"
>
<div class="input-group-append">
<button type="submit" class="btn {{^btnclass}}btn-submit{{/btnclass}} {{ btnclass }} search-icon">
<button type="submit"
class="btn {{^btnclass}}btn-submit{{/btnclass}} {{ btnclass }} search-icon"
{{#buttonattributes}}{{ key }}="{{ value }}" {{/buttonattributes}}
>
{{#pix}} a/search, core {{/pix}}
<span class="sr-only">{{ searchstring }}</span>
</button>
Expand Down

0 comments on commit 49d013e

Please sign in to comment.