Sha256: 1d5ecca1d03841cd2deda45a8b7a8411e49ad53b9f2b9cc2abacb4e121f50854
Contents?: true
Size: 1.35 KB
Versions: 10
Compression:
Stored size: 1.35 KB
Contents
<% # name: headmin/forms/fields/group # # ==== Options # * <tt>form<tt> - Form object # * <tt>name<tt> - Name for the field # * <tt>label<tt> - Text to show as label. Label will be hidden if value is false # # ==== Examples # Basic version # <%= render 'headmin/forms/fields/group', form: form, name: :button do |group| %#> # <div class="row"> # <div class="col-md-6"> # <%= render 'headmin/forms/fields/text', form: group, name: :name do |field, attribute, label| %#> # <%= render "headmin/forms/text", form: field, attribute: attribute, label: label %#> # <% end %#> # </div> # <div class="col-md-6"> # <%= render 'headmin/forms/fields/text', form: group, name: :url do |field, attribute, label| %#> # <%= render "headmin/forms/text", form: field, attribute: attribute, label: label %#> # <% end %#> # </div> # </div> # <% end %#> label = local_assigns.has_key?(:label) ? label : nil show_label = label != false %> <%= render 'headmin/forms/fields/base', form: form, name: name, field_type: :group do |group, field_label| %> <% if show_label %> <%= render 'headmin/forms/label', form: form, attribute: :value, name: label || field_label %> <% end %> <li class="list-group-item mb-3"> <%= yield group %> </li> <% end %>
Version data entries
10 entries across 10 versions & 1 rubygems