Sha256: fffba644886c45b9036762b1da5c4b8afbc1a58798e0e7da62ef502bab50d0d8

Contents?: true

Size: 1.69 KB

Versions: 16

Compression:

Stored size: 1.69 KB

Contents

<%
  # formstrap/password
  #
  # ==== Required parameters
  # * +attribute+ - Name of the attribute of the form model
  # * +form+ - Form object
  #
  # ==== Optional parameters
  # * +append+ - Display as input group with text on the right-hand side
  # * +float+ - Use floating labels. Defaults to false
  # * +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.
  # * +plaintext+ - Render input as plain text.
  # * +prepend+ - Display as input group with text on the left-hand side
  # * +wrapper+ - Hash with all options for the surrounding html tag
  #
  # ==== References
  # https://headmin.dev/docs/forms/password
  # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password
  # https://apidock.com/rails/ActionView/Helpers/FormHelper/password_field
  #
  # ==== Examples
  #   Basic version
  #   <%= form_with do |form| %#>
  #     <%= render "formstrap/password", form: form, attribute: :password %#>
  #   <% end %#>

  password = Formstrap::PasswordView.new(local_assigns)
%>

<%= render "formstrap/wrapper", password.wrapper_options do %>
  <%= render "formstrap/label", password.label_options if password.prepend_label? %>
  <%= render "formstrap/input_group", password.input_group_options do %>
    <%= form.password_field(password.attribute, password.input_options) %>
  <% end %>
  <%= render "formstrap/validation", password.validation_options if password.validate? %>
  <%= render "formstrap/hint", password.hint_options if password.hint? %>
  <%= render "formstrap/label", password.label_options if password.append_label? %>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
formstrap-0.4.5 app/views/formstrap/_password.html.erb
formstrap-0.4.4 app/views/formstrap/_password.html.erb
formstrap-0.4.3 app/views/formstrap/_password.html.erb
formstrap-0.4.2 app/views/formstrap/_password.html.erb
formstrap-0.3.5 app/views/formstrap/_password.html.erb
formstrap-0.3.4 app/views/formstrap/_password.html.erb
formstrap-0.3.3 app/views/formstrap/_password.html.erb
formstrap-0.3.2 app/views/formstrap/_password.html.erb
formstrap-0.3.1 app/views/formstrap/_password.html.erb
formstrap-0.3.0 app/views/formstrap/_password.html.erb
formstrap-0.2.1 app/views/formstrap/_password.html.erb
formstrap-0.2.0 app/views/formstrap/_password.html.erb
formstrap-0.1.3 app/views/formstrap/_password.html.erb
formstrap-0.1.2 app/views/formstrap/_password.html.erb
formstrap-0.1.1 app/views/formstrap/_password.html.erb
formstrap-0.1.0 app/views/formstrap/_password.html.erb