Sha256: 57fc5db13e9e00e1be95567cc4ea2817b7e64a9afed73dd0273b6597fe838b3c

Contents?: true

Size: 964 Bytes

Versions: 9

Compression:

Stored size: 964 Bytes

Contents

<div class="form-group">
  <% Array(value || '').each_with_index do |v, index| %>
    <%= f.label field.slug, field.label, namespace: "f#{index}",class: "control-label #{'sr-only' if index > 0}" %>
    <%= f.text_area_without_bootstrap field.slug, namespace: "f#{index}",multiple: field.is_multiple?, value: v, class: "form-control field-#{field.slug}", readonly: field.readonly_field? %>
  <% end %>

  <% if field.is_multiple? && !field.readonly_field? %>
    <%= content_tag :template, id: "spotlight-field-template-#{field.slug}" do %>
      <%= f.label field.slug, field.label, class: 'control-label sr-only' %>
      <%= f.text_area_without_bootstrap field.slug, multiple: field.is_multiple?, value: nil, class: "form-control field-#{field.slug}" %>
    <% end %>
    <%= content_tag :button, t('helpers.action.add_another'), class: 'btn btn-info', data: { action: 'add-another', template_id: "spotlight-field-template-#{field.slug}" } %>
  <% end %>
</div>

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.0.alpha.2 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-3.0.0.alpha.1 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.13.0 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.12.1 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.12.0 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.11.0 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.10.0 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.9.0 app/views/spotlight/custom_fields/form_group/_text.html.erb
blacklight-spotlight-2.8.0 app/views/spotlight/custom_fields/form_group/_text.html.erb