Sha256: 9abaa291f7b530c792e61c80e4bff1e2195aa68625006fefd728378173d3c480

Contents?: true

Size: 752 Bytes

Versions: 8

Compression:

Stored size: 752 Bytes

Contents

<div class="field <%= options.delete(:field_class) %>">

  <% if has_label %>
    <%- label_options[:class] << ' label' %>
    <%- label_options[:class] << ' required' if options.delete(:required) %>
    <%= label attribute_name, label_text, label_options %>
  <% end %>

  <div class="control <%= options.delete(:control_class) %>">
    <%- options[:class] << ' input' %>
    <%- options[:class] << ' is-danger' if errors[attribute_name].present? %>
    <%= text_field attribute_name, options %>
  </div>

  <%- if hint_text.present? %>
    <p class="help"><%= hint_text %></p>
  <%- end %>

  <%- if errors[attribute_name].present? %>
    <p class="help is-danger"><%= errors.full_messages_for(attribute_name).to_sentence %></p>
  <%- end %>

</div>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
template_form-0.4.10 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.9 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.8 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.7 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.6 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.5 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.4 lib/template_form/templates/bulma/text_input.html.erb
template_form-0.4.3 lib/template_form/templates/bulma/text_input.html.erb