Sha256: 40b4854d4f0a3ccf2e2e322d5f00620e43f8146876d95b4c2177800570a7ec68

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

<% if options.key?(:option_groups) %>
  <% options[:option_groups].each do |group_title, group, group_options| %>
    <div class="p-3">
      <a name="<%= ActiveElement::Components::Util::I18n.class_name(group_title) %>"></a>
      <%= active_element.component.page_section_title group_title %>
      <%= form.fields_for field do |subform| %>
        <% group.each do |label, name, checked| %>
          <%= subform.check_box(name, checked: checked, class: 'me-2') %>
          <%= subform.label name, label %>
          <br/>
        <% end %>
      <% end %>

    </div>
    <hr/>
  <% end %>
<% else %>
  <div class="container w-100">
    <%= form.fields_for field do |subform| %>
      <% options.fetch(:options).each_slice(options.fetch(:columns, 1)) do |slice| %>
        <div class="row w-100">
          <% slice.each do |label, name, checked| %>
            <div class="col">
              <%= subform.check_box(name, checked: checked, class: 'me-2', tabindex: component.tabindex) %>
              <%= subform.label name, label %>
            </div>
            <br/>
          <% end %>
        </div>
      <% end %>
    <% end %>
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
active_element-0.0.14 app/views/active_element/components/form/_check_boxes.html.erb
active_element-0.0.13 app/views/active_element/components/form/_check_boxes.html.erb
active_element-0.0.12 app/views/active_element/components/form/_check_boxes.html.erb
active_element-0.0.11 app/views/active_element/components/form/_check_boxes.html.erb