Sha256: 5ddf65f9b8f90da9e405706a08f9be69868d9daf304fa882290e26f89c93e62f

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

<%
  # headmin/forms/switch
  #
  # ==== Required parameters
  # * +attribute+ - Name of the attribute of the form model
  # * +form+ - Form object
  #
  # ==== Optional parameters
  # * +checked_value+ - Value for checked state
  # * +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.
  # * +unchecked_value+ - Value for unchecked state
  # * +wrapper+ - Hash with all options for the surrounding html tag
  #
  # ==== References
  # https://headmin.dev/docs/forms/switch
  # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox
  # https://apidock.com/rails/ActionView/Helpers/FormHelper/check_box
  #
  # ==== Examples
  #   Basic version
  #   <%= form_with do |form| %#>
  #     <%= render 'headmin/forms/switch', form: form, attribute: :active %#>
  #   <% end %#>

  switch = Headmin::Form::SwitchView.new(local_assigns)
%>

<%= render 'headmin/forms/checkbox', switch.options %>

Version data entries

1 entries across 1 versions & 1 rubygems

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