<%= tag.div class: 'button_number_field' do %>

  <%= f.label attr, local_assigns[:label] unless local_assigns[:skip_label] %>

  <div>
    <%=  button_tag('remove',
                class: "decrease-button hidden btn",
                type: 'button',
                data: {
                  cvalue: -1,
                })%>

    <%= f.number_field attr,
                     value: local_assigns[:value] || f.object.public_send(attr),
                     class: local_assigns[:class],
                     in: local_assigns[:in],
                     disabled: local_assigns[:disabled]%>

    <%=  button_tag('add',
                class: "increase-button hidden btn",
                type: 'button',
                data: {
                  cvalue: 1,
                })%>
  </div>

  <%- f.object.errors.full_messages_for(attr).uniq.each do |msg| -%>
    <%= tag.p msg, role: 'alert' %>
  <% end %>

<%- end -%>
