2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template core/search_input
22 Example context (json):
24 "action": "https://moodle.local/admin/search.php",
25 "extraclasses": "my-2",
26 "inputname": "search",
28 "searchstring": "Search settings",
30 "btnclass": "primary",
31 "query": "themedesigner",
40 <div class="simplesearchform {{ extraclasses }}">
42 <form autocomplete="off" action="{{ action }}" method="get" accept-charset="utf-8" class="mform form-inline simplesearchform">
45 <input type="hidden" name="{{ name }}" value="{{ value }}">
47 <div class="input-group">
48 <label for="searchinput-{{uniqid}}">
49 <span class="sr-only">{{{ searchstring }}}</span>
52 id="searchinput-{{uniqid}}"
54 placeholder="{{ searchstring }}"
55 aria-label="{{ searchstring }}"
56 name="{{ inputname }}"
61 <div class="input-group-append">
62 <button type="submit" class="btn {{^btnclass}}btn-submit{{/btnclass}} {{ btnclass }} search-icon">
63 {{#pix}} a/search, core {{/pix}}
64 <span class="sr-only">{{ searchstring }}</span>
70 <div class="ml-2">{{{ otherfields }}}</div>