Sha256: f57ad073d298520a88bbf7dcacddd92e2da3ed6e6ec9eed6602f19f10b85f8ab
Contents?: true
Size: 872 Bytes
Versions: 63
Compression:
Stored size: 872 Bytes
Contents
<% id ||= "autocomplete-#{SecureRandom.hex(4)}" label ||= nil data_attributes ||= nil options ||= [] selected_option ||= nil multiple ||= false classes = %w(gem-c-accessible-autocomplete govuk-form-group) %> <% if label && options.any? %> <%= tag.div class: classes, data: { module: "accessible-autocomplete" } do %> <%= render "govuk_publishing_components/components/label", { html_for: id }.merge(label.symbolize_keys) %> <% if multiple %> <span class="govuk-hint gem-c-autocomplete__multiselect-instructions"> <%= t('components.autocomplete.multiselect') %> </span> <% end %> <%= select_tag( id, options_for_select(options, selected_option), multiple: multiple, class: "govuk-select", data: data_attributes ) %> <% end %> <% end %>
Version data entries
63 entries across 63 versions & 1 rubygems