Sha256: 6eec044ceef4e8cb147dc060df99b521c375856feaf789162210e0794ecc0d20
Contents?: true
Size: 1.12 KB
Versions: 9
Compression:
Stored size: 1.12 KB
Contents
<%# The following params are the variables that can be used in this partial. @param form [Wallaby::FormBuilder] custom form object that adds a few helper methods and delegate missing methods to the view @param object [Wallaby::ResourceDecorator] decorator instance which wraps the resource (e.g. ActiveRecord) instance @param field_name [String] name of the field @param value [Object] value of the field @param metadata [Hash] metadata of the field %> <div class="form-group <%= form.error_class field_name %>"> <%= form.label field_name, metadata[:label] %> <div class="row"> <div class="col-6 col-sm-4"> <%= form.text_field field_name, class: 'form-control', data: { init: 'colorpicker' } %> </div> </div> <%= form.error_messages field_name %> <%= hint_of metadata %> </div> <% unless @colorpicker_init %> <% @colorpicker_init = true %> <% content_for :custom_javascript do %> <% javascript_tag do %> jQuery(document).off(readyPrefix('.color')).on(readyPrefix('.color'), function () { $('[data-init="colorpicker"]').minicolors({ theme: 'bootstrap' }) }) <% end %> <% end %> <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems