sul-dlss/exhibits

View on GitHub
app/views/shared/_old_site_search_form.html.erb

Summary

Maintainability
Test Coverage
<%= form_tag search_action_url, method: :get, class: 'search-query-form', role: 'search', 'aria-label' => t('blacklight.search.form.submit') do %>
  <%= render_hash_as_hidden_fields(search_state.params_for_search.except(:q, :search_field, :qt, :page, :utf8)) %>
  <% if search_fields.length > 1 %>
    <label for="search_field" class="sr-only"><%= t('blacklight.search.form.search_field.label') %></label>
  <% end %>
  <div class="input-group">
    <%= hidden_field_tag :search_field, search_fields.first.last %>

    <label for="q" class="sr-only"><%= t('blacklight.search.form.search.label') %></label>
    <%= text_field_tag :q, params[:q], placeholder: t('.placeholder'), class: "search-q q form-control rounded-left", id: "q", autofocus: presenter.autofocus?, data: { autocomplete_enabled: presenter.autocomplete_enabled?, autocomplete_path: search_action_path(action: :suggest) }  %>

    <span class="input-group-append">
      <button type="submit" class="btn btn-primary search-btn" id="search">
        <span class="submit-search-text"><%= t('blacklight.search.form.submit') %></span>
        <%= blacklight_icon :search, aria_hidden: true %>
      </button>
    </span>
  </div>
<% end %>