mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-77313 restore: re-add field to indicate course/category search.
When the two restore forms for searching courses and categories were converted to core templates in eb9935c9 they lost the named submit button, which broke searching.
This commit is contained in:
parent
b2d0712748
commit
f3ae5116d0
@ -786,6 +786,10 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
'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);
|
||||
@ -955,6 +959,10 @@ class core_backup_renderer extends plugin_renderer_base {
|
||||
'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);
|
||||
|
@ -28,6 +28,12 @@
|
||||
"searchstring": "Search settings",
|
||||
"value": "policy",
|
||||
"btnclass": "primary",
|
||||
"buttonattributes": [
|
||||
{
|
||||
"key": "name",
|
||||
"value": "hello"
|
||||
}
|
||||
],
|
||||
"query": "themedesigner",
|
||||
"hiddenfields": [
|
||||
{
|
||||
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user