Browse Source

Use form_group attributes for search input

pull/607/head
Paul Robert Lloyd 4 years ago
parent
commit
ceb1d11f5c
  1. 22
      app/components/search_component.html.erb

22
app/components/search_component.html.erb

@ -1,17 +1,15 @@
<%= form_with model: @user, url: path(current_user), method: "get", local: true do |f| %> <%= form_with model: @user, url: path(current_user), method: "get", local: true do |f| %>
<div class="app-search govuk-!-margin-bottom-4"> <div class="app-search govuk-!-margin-bottom-4">
<div class="govuk-form-group app-search__form-group"> <%= f.govuk_text_field :search,
<%= f.govuk_text_field :search, form_group: {
label: { text: search_label }, class: "app-search__form-group",
type: "search", },
value:, label: { text: search_label },
autocomplete: "off", type: "search",
class: "app-search__input" %> value:,
</div> autocomplete: "off",
class: "app-search__input" %>
<button class="govuk-button app-search__button undefined" data-module="govuk-button">
Search
</button>
<%= f.govuk_submit "Search", classes: "app-search__button" %>
</div> </div>
<% end %> <% end %>

Loading…
Cancel
Save