Sha256: 469c8385d9c8f5f7dd84659a4e329195eaa696c95c38c670847b086374b0267e

Contents?: true

Size: 1.25 KB

Versions: 1

Compression:

Stored size: 1.25 KB

Contents

<%
  # headmin/forms/color
  #
  # ==== Required parameters
  # * +attribute+ - Name of the attribute of the form model
  # * +form+ - Form object
  #
  # ==== Optional parameters
  # * +hint+ - Informative text to assist with data input. HTML markup is allowed.
  # * +label+ - Text to display inside label tag. Defaults to the attribute name. Set to false if you don"t want to show a label.
  # * +wrapper+ - Hash with all options for the surrounding html tag
  #
  # ==== References
  # https://headmin.dev/docs/forms/color
  # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color
  # https://apidock.com/rails/v5.2.3/ActionView/Helpers/FormHelper/color_field
  #
  # ==== Examples
  #   Basic version
  #   <%= form_with do |form| %#>
  #     <%= render 'headmin/forms/color', form: form, attribute: :active %#>
  #   <% end %#>

  color = Headmin::Form::ColorView.new(local_assigns)
%>

<%= render 'headmin/forms/wrapper', color.wrapper_options do %>
  <%= render 'headmin/forms/label', color.label_options if color.label? %>
  <%= form.color_field(color.attribute, color.input_options) %>
  <%= render 'headmin/forms/validation', color.validation_options if color.validate? %>
  <%= render 'headmin/forms/hint', color.hint_options if color.hint? %>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
headmin-0.5.2 app/views/headmin/forms/_color.html.erb