<%= f.field_container :provider, class: ['form-group'] do %>
<%= f.label :type, Spree.t(:provider) %>
<%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {id: 'gtwy-type', class: 'select2'}) %>
<% end %>
<% unless @object.new_record? %>
<%= braintree_basic_preference_fields(@object, f) %>
<% if @object.respond_to?(:preferences) %>
<%= Spree.t(:provider_settings_warning) %>
<% end %>
<% end %>
<%= f.field_container :payment_method_display_on, class: ['form-group'] do %>
<%= label_tag :payment_method_display_on, Spree.t(:display) %>
<%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [Spree.t(display), display.to_s] }, {}, {:class => 'select2'}) %>
<% end %>
<%= f.field_container :payment_method_auto_capture, class: ['form-group'] do %>
<%= label_tag :payment_method_auto_capture, Spree.t(:auto_capture) %>
<%= select(:payment_method, :auto_capture, [["#{Spree.t(:use_app_default)} (#{Spree::Config[:auto_capture]})", ''], [Spree.t(:say_yes), true], [Spree.t(:say_no), false]], {}, {:class => 'select2'}) %>
<% end %>
<%= f.field_container :payment_method_active, class: ['form-group'] do %>
<%= Spree.t(:active) %>
<%= label_tag :payment_method_active_true do %>
<%= radio_button :payment_method, :active, true %>
<%= Spree.t(:say_yes) %>
<% end %>
<%= label_tag :payment_method_active_false do %>
<%= radio_button :payment_method, :active, false %>
<%= Spree.t(:say_no) %>
<% end %>
<% end %>
<%= f.field_container :payment_method_name, class: ['form-group'] do %>
<%= label_tag :payment_method_name, Spree.t(:name) %>
<%= text_field :payment_method, :name, :class => 'form-control' %>
<% end %>
<%= f.field_container :payment_method_description, class: ['form-group'] do %>
<%= label_tag :payment_method_description, Spree.t(:description) %>
<%= text_area :payment_method, :description, { :cols => 60, :rows => 6, :class => 'form-control' } %>
<% end %>