Sha256: 807aac5af60cff611123c29302bf2c25e536dce88c50b12c90def9d740caeac3

Contents?: true

Size: 1.96 KB

Versions: 16

Compression:

Stored size: 1.96 KB

Contents

<%
  # headmin/forms/url
  #
  # ==== 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
  # * +collection+ - Values to be suggested while typing. Can be an collection array or a remote URL.
  # * +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.
  # * +list+ - Options are passed through options_for_select
  # * +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/url
  # https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/url
  # https://apidock.com/rails/ActionView/Helpers/FormHelper/url_field
  #
  # ==== Examples
  #   Basic version
  #   <%= form_with do |form| %#>
  #     <%= render "headmin/forms/url", form: form, attribute: :website_url %#>
  #   <% end %#>

  url = Headmin::Form::UrlView.new(local_assigns)
%>

<%= render "headmin/forms/wrapper", url.wrapper_options do %>
  <%= render "headmin/forms/label", url.label_options if url.prepend_label? %>
  <%= render "headmin/forms/input_group", url.input_group_options do %>
    <%= form.url_field(url.attribute, url.input_options) %>
    <%= render "headmin/forms/datalist", url.datalist_options if url.datalist? %>
    <%= render "headmin/forms/autocomplete", url.autocomplete_options if url.autocomplete? %>
  <% end %>
  <%= render "headmin/forms/validation", url.validation_options if url.validate? %>
  <%= render "headmin/forms/hint", url.hint_options if url.hint? %>
  <%= render "headmin/forms/label", url.label_options if url.append_label? %>
<% end %>

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
headmin-0.6.3 app/views/headmin/forms/_url.html.erb
headmin-0.6.2 app/views/headmin/forms/_url.html.erb
headmin-0.6.1 app/views/headmin/forms/_url.html.erb
headmin-0.6.0 app/views/headmin/forms/_url.html.erb
headmin-0.5.9 app/views/headmin/forms/_url.html.erb
headmin-0.5.8 app/views/headmin/forms/_url.html.erb
headmin-0.5.7 app/views/headmin/forms/_url.html.erb
headmin-0.5.6 app/views/headmin/forms/_url.html.erb
headmin-0.5.5 app/views/headmin/forms/_url.html.erb
headmin-0.5.4 app/views/headmin/forms/_url.html.erb
headmin-0.5.3 app/views/headmin/forms/_url.html.erb
headmin-0.5.1 app/views/headmin/forms/_url.html.erb
headmin-0.5.0 app/views/headmin/forms/_url.html.erb
headmin-0.4.2 app/views/headmin/forms/_url.html.erb
headmin-0.4.1 app/views/headmin/forms/_url.html.erb
headmin-0.4.0 app/views/headmin/forms/_url.html.erb