Sha256: 9afb1fc5b1cfcc24598b2642f07815bbe59df14c7bed07e66abea827e9b8f595
Contents?: true
Size: 1.24 KB
Versions: 15
Compression:
Stored size: 1.24 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).in_groups(options.fetch(:columns, 1)).reduce(&:zip).each do |columns| %> <div class="row w-100"> <% columns.each do |label, name, checked| %> <div class="col"> <% if [label, name, checked].any?(&:present?) %> <%= subform.check_box(name, checked: checked, class: 'me-2', tabindex: component.tabindex) %> <%= subform.label name, label %> <% end %> </div> <br/> <% end %> </div> <% end %> <% end %> </div> <% end %>
Version data entries
15 entries across 15 versions & 1 rubygems