Sha256: aa66f3402ddefb19e289f5df0979c625487014b32019f5c5ea59f97b1a728ce1
Contents?: true
Size: 1.34 KB
Versions: 42
Compression:
Stored size: 1.34 KB
Contents
<% inline = local_assigns[:inline].presence %> <% label_col = f&.label_col %> <% control_col = f&.control_col %> <% offset_col = label_col.sub('col', 'offset') %> <div class="form-group <%= "row" if inline %>"> <% Array(value || '').each_with_index do |v, index| %> <%= f.label field.slug, field.label, namespace: "f#{index}", class: "col-form-label #{label_col if inline} #{'sr-only' if index > 0}" %> <div class="mb-3 <%= control_col if inline %>"> <%= f.text_field_without_bootstrap field.slug, namespace: "f#{index}", multiple: field.is_multiple?, value: v, class: "form-control field-#{field.slug}", readonly: field.readonly_field? %> </div> <% 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: "col-form-label #{label_col if inline} sr-only" %> <div class="mb-3 <%= "#{offset_col} #{control_col}" if inline %>"> <%= f.text_field_without_bootstrap field.slug, multiple: field.is_multiple?, value: nil, class: "form-control field-#{field.slug}" %> </div> <% end %> <%= content_tag :button, t('helpers.action.add_another'), class: 'btn btn-info btn-sm h-100', data: { action: 'add-another', template_id: "spotlight-field-template-#{field.slug}" } %> <% end %> </div>
Version data entries
42 entries across 42 versions & 1 rubygems