<% label = local_assigns[:label].presence %>
<% html_options = {class: 'input_integer fullwidth'}.update(local_assigns[:html_options] || {}) %>

<div class="field">
  <% if local_assigns[:form] %>
    <%= form.label attribute, label %>
    <%= form.number_field attribute, html_options %>
  <% else %>
    <%= label_tag name, label %>
    <%= number_field_tag name, value, html_options %>
  <% end %>
</div>
