<div id="bazar-search-{{ listId }}">
  <form action="" method="get" name="search-form" id="search-form" class="form-horizontal">
    {% set handler = url({tag:pageTag})|slice(url({tag:pageTag,handler:' '})|length-1) %}
    <input type="hidden" name="wiki" value="{{ pageTag ~ (handler ? '/' ~ handler : '') }}">
    <input type="hidden" name="vue" value="consulter">
    <input type="hidden" name="action" value="recherche">
    <div class="bazar-search control-group">
      <div class="input-group input-prepend input-append">
        <span class="add-on input-group-addon"><i class="fa fa-search icon-search"></i></span>
        <input type="text" value="{{ params.keywords }}" name="keywords" placeholder="{{ _t('BAZ_MOT_CLE') }}" class="search-input form-control input-lg">
        {% if forms|length > 1 %}
          <span class="input-group-btn search-filter" style="width:auto;max-width:240px;">
            <select onchange="javascript:this.form.submit();" class="form-control input-lg" name="selectedID">
              <option value="">{{ _t('BAZ_TOUS_TYPES_FICHES') }}</option>
              {% for form in forms %}
                <option value="{{ form.bn_id_nature }}" {% if form.bn_id_nature == selectedID %}selected{% endif %}>
                  {{ form.bn_label_nature }}
                </option>
              {% endfor %}
            </select>
          </span>
        {% else %}
          <input type="hidden" name="id" value="{{ formId }}">
        {% endif %}
        {% if params.query %}
          <input type="hidden" name="query" value="{{ params.query|map(p=>p.name ~ p.operator ~ p.value)|join('|')|e('html_attr') }}">
        {% endif %}
        <input type="hidden" name="facette" value="{{ facette }}">
        <span class="input-group-btn search-button-container">
          <input value="{{ _t('BAZ_RECHERCHER') }}" class="btn btn-primary" type="submit" />
        </span>
      </div>
    </div>
  </form>
</div>
