<% if has_label %>
<%- label_options[:class] << ' label' %>
<%- label_options[:class] << ' required' if options.delete(:required) %>
<%= label attribute_name, label_text, label_options %>
<% end %>
<%- options[:class] << ' input' %>
<%- options[:class] << ' is-danger' if errors[attribute_name].present? %>
<%= text_field attribute_name, options %>
<%- if hint_text.present? %>
<%= hint_text %>
<%- end %>
<%- if errors[attribute_name].present? %>
<%= errors.full_messages_for(attribute_name).to_sentence %>
<%- end %>