{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template theme_boost_magnific/frontpage-search

    This template renders the main content area for the myoverview block.

    Example context (json):
    {
      "extraclasses": "search-form-extra",
      "searchstring": "Search for courses",
      "action": "/search/courses",
      "hiddenfields": [
        { "name": "sesskey", "value": "abc123" },
        { "name": "page", "value": "1" }
      ],
      "uniqid": "98765",
      "inputname": "search",
      "query": "Moodle",
      "btnclass": "btn-primary"
    }

}}

<div class="simplesearchform frontpage-simplesearchform-search text-center {{ extraclasses}}">

    <h3 style="display: none">{{ searchstring}}</h3>

    <form autocomplete="off" action="{{ action}}" method="get" accept-charset="utf-8"
          class="mform form-inline simplesearchform">
        {{#hiddenfields}}
            <input type="hidden" name="{{ name}}" value="{{ value}}">
        {{/hiddenfields}}
        <div class="input-group">
            <input type="text"
                   id="searchinput-{{uniqid}}"
                   class="form-control search-button"
                   placeholder="{{ searchstring}}"
                   aria-label="{{ searchstring}}"
                   name="{{ inputname}}"
                   data-region="input"
                   autocomplete="off"
                   value="{{ query}}">
            <div class="input-group-append">
                <button type="submit" class="btn {{^btnclass}}btn-submit{{/btnclass}} {{ btnclass}} search-icon">
                    {{#pix}} a/search, core {{/pix}}
                    <span class="sr-only">{{ searchstring}}</span>
                </button>
            </div>
        </div>
    </form>
</div>
